Tim,

if I understand correctly, your concern is not whether your app can handle 
so much more traffic, but how the traffic relates to instance hours (that 
are billed).

There is no general formula to make accurate predictions. But there are 
some factors you can use to calculate.

   - How many devices or requests can one instance of your app handle in 
   parallel? So, if your current daily average is 100 instance hours for 500 
   clients throughout the day, you probably will need less than 1,000 hours 
   for 5,000 clients per day.
   - How well does your app scale with an increasing number of clients? 
   There are factors that your instance hours grow much slower than the number 
   of devices, e.g. if your memcache hit ratio is growing, or you can save 
   money by paying for a dedicated memcache. At least in Python, if 
   thread-safe apps can save money because an instance can handle multiple 
   requests at once (e.g. while it waits for datastore read from request 1, it 
   continues with request 2). Maybe you also have instances running in the 
   background which would run anyway, e.g. a cron-job for an admin task or 
   uptime check, and is not affected by the number of clients. On the other 
   hand, if your app scales worse, you might need exponentially more instance 
   hours for more clients. A typical reason for this would be an increased 
   error-rate (e.g. by writing into hotspots in your datastore causing 
   contention / transaction failures) and for bottlenecked tasks that are not 
   using back-offs. Also see the article Designing for Scale 
   <https://cloud.google.com/appengine/articles/scalability>, and if you 
   use Cloud Datastore Avoiding Datastore Contention 
   <https://cloud.google.com/appengine/articles/scaling/contention>, and 
   this doc for managing scaling for PHP apps 
   
<https://cloud.google.com/appengine/docs/standard/php/console/managing-resources>
   .
   - How are these peak-times distributed? Every instance that is started 
   is billed for at least 15 minutes run-time, even when it is idle. The 
   default idle time before an instance is shut down (in auto-scale) is 15 
   minutes. So, if the peak hits your app every 20 minutes for 1 minute, this 
   would mean that many new instances are launched, working for 1 minute, than 
   idling for 14 minutes, shut down (billed for 15 minutes), and restarted 
   after 5 minutes. In this case it would be cheaper to adjust your 
   configuration so the instances are shutdown only after 20 minutes of idle 
   time or so.

The 28 instance hours per day relate to instance(s) running for 28 real 
hours of the class F1 (the smallest frontend instances using automatic 
scaling). F2 would translate to 14 real hours with higher hardware spec, 
and so on. If you use manual or basic scaling, you use B-class instances 
that have fewer free instance hours per day. See Instance Classes 
<https://cloud.google.com/appengine/docs/standard/#instance_classes> for 
the hardware specs.

So, if you think your app will scale more or less linearly, and your future 
traffic distributes across the day the same as now, just multiply your 
current instance hours with the factor of client growth you expect. Then 
just subtract your free instance hours per day.

I hope this was helpful. Good luck!
Ani

Am Samstag, 22. Juli 2017 08:52:35 UTC+2 schrieb Tim Bateson:
>
> Hi George,
>
> The following metric is the one that I am not sure about and how it 
> relates to end users sending requests to load the web pages.
>    
>    - 28 instance hours per day
>
> Thanks,
> Tim
>
>
> On Friday, 21 July 2017 15:30:01 UTC+1, George (Cloud Platform Support) 
> wrote:
>>
>> Hello Tim, 
>>
>> Do you mean users sending requests at once? You are right, and I'll 
>> respect your wish, not referring you to the already read page, but to 
>> "Always 
>> Free Usage Limits 
>> <https://cloud.google.com/free/docs/always-free-usage-limits>". You 
>> don't have to worry about resources not indicated there, so not measured. 
>>
>
-- 
HATZIS Edelstahlbearbeitung GmbH
Hojen 2
87490 Haldenwang (Allgäu)
Germany

Handelsregister Kempten (Allgäu): HRB 4204
Geschäftsführer: Paulos Hatzis, Charalampos Hatzis
Umsatzsteuer-Identifikationsnummer: DE 128791802

http://www.hatzis.de/

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ad59c6e6-e858-4e4f-b1ff-3207f07f7af4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to