Please add MIN idle instances and MAX total instances

172 views
Skip to first unread message

Daniel Florey

unread,
Sep 10, 2011, 4:33:37 AM9/10/11
to google-a...@googlegroups.com
I don't mind that there is a max idle instances slider, but I'd love to see a min idle instances (=always on) and a max total instances.
This would allow me to avoid crazy billing when the app is under heavy load and to keep free apps to run out of instance hours.
I'm happy to read that free instance hours have been increased to 28, but it would be great to be able to assure that the app is serving requests whole day.

Steve

unread,
Sep 10, 2011, 4:55:44 AM9/10/11
to google-a...@googlegroups.com
+1 to MAX_TOTAL_INSTANCES

Prashant Gupta

unread,
Sep 10, 2011, 4:58:53 AM9/10/11
to google-a...@googlegroups.com
+1

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/525WLu3pNtUJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

keakon lolicon

unread,
Sep 10, 2011, 6:30:20 AM9/10/11
to google-a...@googlegroups.com
I have an instance almost did nothing in the past 13 minutes.
I have set max idle instance to 1, min panding latency to 15 seconds. I don't know why it has been launched.

----------
keakon

My blog(Chinese): www.keakon.net
5458D03F-ED3D-4B10-987D-3970A3DD59F0.jpg

Gerald Tan

unread,
Sep 10, 2011, 12:39:36 PM9/10/11
to google-a...@googlegroups.com
I wished Google made it clearer, but guys, please stop worrying about the Blue "Total Instances" line when it comes to billing. You are NOT charged for the Blue line, but for the YELLOW "Active Instances" line plus 1. Your actual Instance-Hour change is "Max Idle Instance plus Active Instance" (except when you have 0 instances up where you will be charged 0).

If you set Max Idle Instance to 1. Your free application should have no problem staying under the 28 Instance-Hour quota even if the scheduler decides to spawn 2-4 instances for you all day, as long as your "Active Instances" average is below 0.1666

Again, IGNORE THE BLUE LINE. Worry about keeping the YELLOW line below 0.1666

Robert Kluin

unread,
Sep 10, 2011, 1:51:01 PM9/10/11
to google-a...@googlegroups.com
I would like to be able to limit *active* instances too. Particularly
for my 'testing' applications. I don't want to have 20 or 30
instances spun up while I'm testing stuff. Would prefer to limit it.

It would be handy to prevent hitting over-quota errors at the risk of
degraded performance.


Robert

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/google-appengine/-/FGV2F-eHOXMJ.

JH

unread,
Sep 10, 2011, 3:15:54 PM9/10/11
to Google App Engine
+1 for max active instances....

WeatherPhilip

unread,
Sep 10, 2011, 4:38:52 PM9/10/11
to Google App Engine
This message may be true, but that just makes it worse. Under the new
scheme, my billing moves from $0.00 (fall within the free app
boundaries) to $0.01 - $0.08 per day. I guess that people wont be able
to use my app during the last hour (or so) of the day. When Google
said that few apps would continue to be free, I think they meant to
say that no apps would continue to be free *if* they handled any
requests. If the free quota for instance hours was (say) 28, then a
lot of the free apps would still continue to be free.

Is it worth my spending $72/year for each of my apps? No. I'm looking
at Typhoon for one, and rewriting the others in C and running them all
on an existing web server that I have.

Philip

Barry Hunter

unread,
Sep 10, 2011, 4:51:49 PM9/10/11
to google-a...@googlegroups.com
On Sat, Sep 10, 2011 at 9:38 PM, WeatherPhilip
<philip...@gladstonefamily.net> wrote:
> This message may be true, but that just makes it worse. Under the new
> scheme, my billing moves from $0.00 (fall within the free app
> boundaries) to $0.01 - $0.08 per day. I guess that people wont be able
> to use my app during the last hour (or so) of the day. When Google
> said that few apps would continue to be free, I think they meant to
> say that no apps would continue to be free *if* they handled any
> requests. If the free quota for instance hours was (say) 28, then a
> lot of the free apps would still continue to be free.

It is 28 hours :)

http://googleappengine.blogspot.com/2011/09/few-adjustments-to-app-engines-upcoming.html

Not reflected in the 'billing estimate's yet.

Get 9 hours of backends free too. A number of cronjobs etc, could be
tweaked to use backends (particully if use pull queues) to save on
your front end usage.

Steve

unread,
Sep 10, 2011, 6:42:39 PM9/10/11
to google-a...@googlegroups.com
Please star Issue 5858 that I just opened requesting Max-Instances control.

Gerald Tan

unread,
Sep 10, 2011, 11:54:41 PM9/10/11
to google-a...@googlegroups.com
That's just silly. Again, you are paying for Max Idle Instance + Active Instances.
It doesn't matter if you have 1 Total Instance, 5 Total Instance or 30 Total Instance, as long as you set Max Idle Instance to 1, YOU WILL BE INCURRING THE SAME COST. The Total Instances does NOT affect your Active Instances. Active Instances is affected by your workload. Your workload doesn't change whether you have 1, 5 or 30 Total Instances.

Steve

unread,
Sep 11, 2011, 1:30:36 AM9/11/11
to google-a...@googlegroups.com
It's not silly.  When the workload exceeds your budget capacity, being able to limit the active instances would allow you to keep operating with increased latency.  Not being able to limit the instances means your app will scale beautifully right up to the point where your budget is exhausted and you app nose dives.

Tim

unread,
Sep 11, 2011, 5:54:37 AM9/11/11
to google-a...@googlegroups.com
A max-instances setting would, as you say, let you spread your "capacity exceeded" failures to some proportion of requests made during the busiest periods rather than to all requests at some time period at the end of the day/week/month, but it would also risk failing to serve some requests which, with hindsight, could have been served without exceeding the overall quota (ie a short busy burst followed by a long period of normal traffic).

That pattern is effectively what normal hosting achieves, whereas GAE is expressly designed to be able to, out of the box, not fall over in that way, so while I see your point in requesting such a control facility, I can see why it wasn't provided up front and why it might not be seen as a high priority by the builders and many of the users of GAE.

--
T

WeatherPhilip

unread,
Sep 11, 2011, 1:47:25 PM9/11/11
to Google App Engine


On Sep 10, 4:51 pm, Barry Hunter <barrybhun...@gmail.com> wrote:
> On Sat, Sep 10, 2011 at 9:38 PM, WeatherPhilip
>
>
> It is 28 hours :)
>
> http://googleappengine.blogspot.com/2011/09/few-adjustments-to-app-en...
>
> Not reflected in the 'billing estimate's yet.
>
> Get 9 hours of backends free too. A number of cronjobs etc, could be
> tweaked to use backends (particully if use pull queues) to save on
> your front end usage.

Ah -- excellent. This will keep me in the free zone!

Philip

Daniel Florey

unread,
Sep 11, 2011, 2:58:24 PM9/11/11
to google-a...@googlegroups.com
After thinking about this for a while I think I would prefer to just have a min and max instances slider.
I am running different apps on app engine and for the larger ones I'd like to have a min instances = 10 and max instances = unlimited to be able to scale up fast once heavy traffic occurs.
For the smaller apps I'd like to set max instances to a low value to limit scaling. For free apps I'd like to set max instances to 1.
I have no clue if this is technically doable but it's at least the easiest to understand for me...


Johan Euphrosine

unread,
Sep 12, 2011, 4:36:57 AM9/12/11
to google-a...@googlegroups.com
Actually that's what Min-Pending-Latency is for:

It will limit the number of instances that the scheduler spawns to
handle incoming requests, by allowing them to sit up to
Min-Pending-Latency in the pending queue waiting for an instance to be
available before spawning a new one.

Setting Max-Active-Instance to 1 (if this setting existed) would have
a similar effect than maxing Min-Pending-Latency to 15s: request would
wait in the pending queue for that instance to be available.

Hope that helps to understand this performance setting better.

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/google-appengine/-/gbrqNPQipOAJ.


> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

--
Johan Euphrosine (proppy)
Developer Programs Engineer
Google Developer Relations

Daniel Florey

unread,
Sep 12, 2011, 6:31:51 AM9/12/11
to google-a...@googlegroups.com
Johan,

thanks for your reply. I think I more or less got how the current settings influence the scheduler.
But I guess you agree that it would be much much simpler from a developers view to simply have two sliders:
- one specifying the min and max instances for the app
- another one for specifying how aggressively the app should scale (from slow to fast)

The number of questions regarding the scheduler indicates that the current approach is not very intuitive from a users point of view - even though it may reflect the internals of the current scheduler implementation best from your side

Bay

unread,
Sep 12, 2011, 7:46:43 AM9/12/11
to google-a...@googlegroups.com
Except the latency slider is not really enforced. That's the reason why developers want the opportunity to actually restrict new instances.

Requests never reach 15s on my app. Still new ones are spawned. These are _active_ for some time before they are killed. Thus, for that period, we are billed regardless of the min. _idle_ instances settings.

Ugorji Nwoke

unread,
Sep 12, 2011, 8:01:03 AM9/12/11
to google-a...@googlegroups.com
IMO Min-Pending-Latency and Max-Instances should be complementary. For example:
- let min-pending latency be around 2 second for my app ie spawn instances on-demand if pending-latency is over 2 seconds
- but if we are already running 10 instances, then allow max-pending-latency reach up to 15 seconds, before you start rejecting requests.

Really, this should help us with the following:
- your app suddenly gets very popular, and you don't want to go broke with a ridiculously high bill. The max-daily-budget is a bad solution because it shuts down your app till the end of the day (as opposed to giving you controls so you can throttle your app).


Ugorji Nwoke

unread,
Sep 12, 2011, 8:13:16 AM9/12/11
to google-a...@googlegroups.com
I wrote a blog post about this before http://blog.ugorji.net/2011/09/objective-gripes-with-new-google-app.html

In thinking more, it seems like the following knobs should be sufficient to give us control over our budgets, and have graceful degradation of performance when things get high.
- max-total-instances
- max-idle-instance (which can be set to zero. So any unused instances should be shut down. Folks wanting always-on can set this to a higher value.)
- min-pending-latency (this is the default value at which a new instance is started. If num-instances == max-total-instances, then allow the pending-latency to go up to either 15 or 30 seconds before returning a 503 Service Unavailable).

This could allow Google the simplicity of a minimum set of knobs to start, while allowing us control our budget and degrade gracefully.


Robert Kluin

unread,
Sep 13, 2011, 12:56:00 AM9/13/11
to google-a...@googlegroups.com
I'd also like a min-idle-instances so I can keep some excess capacity
around for apps that get bursty traffic. Otherwise looks good.


Robert

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/google-appengine/-/0gedf-B1-u4J.

Reply all
Reply to author
Forward
0 new messages