The instance scheduler still has problems

52 views
Skip to first unread message

Tapir

unread,
Apr 4, 2012, 10:30:00 PM4/4/12
to Google App Engine
In my previous post,

http://groups.google.com/group/google-appengine/browse_thread/thread/c5ab4ec85c5b5525/b8f97af3ddcdcaa1?lnk=gst&q=charming#b8f97af3ddcdcaa1

I said "after I rewrote the custom warm-up servlet, I found it works
like a charming".
Yes, the warm-up cases really becomes fewer, but now I find it still
exits.

After some research, I found the behavior of the instance scheduler is
uncertain.

Here is a case: one resident instance is idle, a new request coming,
the idle resident instance will handle it. At the same time, another
new request coming, the scheduler wait pending latency time, the idle
instance is still not free, so a new instance is started, which needs
20-30 seconds to warmup. After ***N seconds***, the scheduler found
the new instance is still not warmed-up and found the resident
instance is free now, so the scheduler let the resident instance also
hand the second new request.

The implementation is not bad, but the strange thing is ***N
seconds*** varies from 1 second to 30 seconds.
That is why some warm-up requests will be still encountered.

btw, I found affer I rewrote the custom warm-up servlet, 99% percent
cases of the effort to create a new instance are useless. The new
created instance will be shutdown without handling any user requests.

Per

unread,
Apr 5, 2012, 7:43:55 AM4/5/12
to google-a...@googlegroups.com

The scheduler is most likely made with larger applications in mind (hundreds of instances). I saw plenty of isses when I tried to optimise for few instances. I had very similar issues as you had, when I was on a 2/2 setting for instance. Basically I wanted to have 2 instances all the time, and I tried 2/2, 2/3, 3/3, 1/3, and 1/2.

But what works best (by far!) for me at the moment is the setting "automatic/3". I decided to use the F4 instance as well. It now turns out I always have 2 or 3 instances running, but only get charged for one :) And very few spin-up and spin-down happening. And consistently fast responses too.

Every app is different, so do experiment a bit.
Reply all
Reply to author
Forward
0 new messages