Good question.  Here's how this works.  For the moment, let's only consider 
resident backends:

1) Backends are charged for uptime by the minute.
2) Whenever a backend instance goes down, the system will continue to bill 
for an extra 15 minutes.
3) If a backend comes back up within the 15 minute period after it last shut 
down, it gets partial credit for the time it would have been charged for.

For example, let's say a backend instance starts up and runs for 30 minutes, 
and then stops.  The total charge is 45 minutes.

Taking another step, let's say a backend instance starts up and runs for 30 
minutes, stops, and then comes back up 10 minutes later and runs for an 
hour.  The total charge is as follows:

- 30 minutes for the first uptime interval
- 10 minutes of additional time
- 60 minutes for the second uptime interval
- 15 minutes of additional time

Total time elapsed: 115 minutes
Total time billied: 115 minutes

Thus, you could describe this system as "blended intervals", where we never 
double-charge for uptime, and smooth across periods of downtime that last 
less than 15 minutes.  So the "15-minute charge for startup" is a simplified 
way of explaining things.  You can think of it that way, but you're never 
double-counted for uptime.

Dynamic backends work the same way, except that we use "active intervals" 
rather than "uptime intervals".  If your dynamic backend is handling a 
request, it is considered active.

As an example, let's say your dynamic backend was handling requests for 30 
minutes, then was idle for 10 minutes, then handled requests for another 60 
minutes.  The charge would work out exactly as the example above, except 
that your backend would likely be evicted after about ~2-5 minutes of idle 
time.  So the timeline looks like:

- startup 
- active for 30 minutes
- idle for 3 minutes
- shutdown
- down for 7 minutes
- startup
- active for 60 minutes
- idle for 3 minutes
- shutdown

Since the period of downtime was less than 15 minutes, the total charge is 
as if the backend was active for 100 minutes, with an extra 15 minutes 
appended at the end.

The upshot of all this is that the system encourages you to keep your 
backend instances up and active for long periods, rather than starting and 
stopping them regularly.  If you're doing that, then you probably don't need 
to use a backend. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to