Sorry, but you're way over engineering for this tiny app.  No need for a 
database, or any back end we'd want to spend money or man hours on.  There 
are posters and retrievers.  Retrievers outnumber posters like 10 to one, 
but there will not even be dozens of concurrent requests, let alone 
hundreds or thousands.  Posting adds or updates tiny data to a name-value 
pair collection, retrievers get some subset of entries from that name value 
pair collection matching certain criteria. Entries are culled when they're 
90 seconds old, so that collection never gets huge...few hundred entries at 
most. Posts and requests will take a few milliseconds to complete.  App 
does nothing with the data other than remember it for retrieval in that 
collection.

Being forced to single-threaded (1 concurrent request) was unexpected, but 
at least it saved me from coding in concurrency protection myself.

So now I have to ask, to what extent will my app be protected from junk 
requests that aren't actually from my users, e.g. bots, spiders, kids being 
stupid, etc.?  I just don't want to get a $1000 invoice from garbage 
traffic.  Can I put something in the HTTP headers such that any calls to 
the app missing that header are just discarded?

On Thursday, April 9, 2020 at 2:35:05 PM UTC-4, Phillip Pearson wrote:
>
> In GCF, each instance can only handle one request at a time, so it means 
> one concurrent request.  To see what this means in the context of your app, 
> you would have to try deploying it with --max-instances 1 and load testing, 
> as it very much depends on how long each request takes to service.
>
> If you're planning on handling hundreds or thousands of concurrent 
> requests, you might want to try out App Engine or Cloud Run, both of which 
> can handle multiple concurrent requests inside an instance.  That said, 
> you're always going to run into the limits of a single instance if you 
> don't use a database.  I would recommend using something like Redis (with 
> persistence turned off), which you can provision via Cloud Memorystore or 
> on a Compute Engine instance, which will let you share data between as many 
> GCF / GAE / GCR instances as you need.
>
> Cheers,
> Phil
>
> On Thu, Apr 9, 2020 at 6:34 AM MrGadget <ch...@langsenkamp.com 
> <javascript:>> wrote:
>
>> Just to confirm, all these https posts and gets count toward the 2M / 
>> month in the free tier I linked originally?  We should be well under that.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-a...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-appengine/998d9c93-2bac-44c1-8814-93a19317f6c5%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-appengine/998d9c93-2bac-44c1-8814-93a19317f6c5%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e88bc1f9-3a13-4257-8576-82edad120dee%40googlegroups.com.

Reply via email to