> But you dont know that the cron handler is going to run on the same
> machine that the next visitor is going to hit. In fact cron may even
> be running on machines not serving www traffic.

A very, very good point.  That argues for pinging it externally.

> An app might be running on different machines (or even different data
> centers) each time its been run.

Indeed it might.  But if the ping is coming from the same network
location, barring load limits being reached, etc., etc., etc., I would
expect fairly quickly for the app to settle down on the same couple of
servers.

Let me raise the question of whether the ping would be of any value AT
ALL; because if not, it's just going to sit there consuming quotas and
potentially making Google unhappy.  Part of the point of AppEngine is
we get to take advantage of Google's extensive CDN.  If your ping is
from a network in California, I wouldn't be surprised to find that a
customer in New York gets a cold instance.  I'd be truly shocked if a
customer in Ireland or Ukraine didn't, at least once things are up and
running properly. (Here in the preview period, it wouldn't surprise me
if most AppEngine stuff is still coming out of just a couple of data
centres for now.)

FWIW,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Apr 21, 2:41 pm, Barry Hunter <barrybhun...@googlemail.com> wrote:
> But you dont know that the cron handler is going to run on the same
> machine that the next visitor is going to hit. In fact cron may even
> be running on machines not serving www traffic.
>
> An app might be running on different machines (or even different data
> centers) each time its been run.
>
> On 21/04/2009, Jason C <jason.a.coll...@gmail.com> wrote:
>
>
>
>
>
> >  I tried using the new cron facility to hit a url every minute in an
> >  attempt to keep an instance hot. I am seeing a full instance spin-up
> >  on every hit (>3,000ms-cpu).
>
> >  If the application cache timeout was extended to just over a minute,
> >  at least the cron facility would be able to be used to keep an
> >  instance hot. This would tremendously help new applications that are
> >  just building traffic.
>
> >  j
>
> >  On Mar 13, 12:04 am, Brett Slatkin <brett-appeng...@google.com> wrote:
> >  > Heyo,
>
> > > On Tue, Mar 10, 2009 at 7:16 PM, cz <czer...@gmail.com> wrote:
> >  > > Actually, that is normal behavior. This has been discussed in previous
> >  > > threads.
> >  > > GAE seems to aggressively purge it's app cache, average app lifetime
> >  > > appears to be under 2 seconds. Appengine-patch may be marginally
> >  > > faster but both require Django1.x to be imported via zipimport, which
> >  > > is pretty expensive.
> >  > > Our app also exhibits this problem due to fairly low traffic, but
> >  > > there's not much that can be done as far as I can tell. Our app's
> >  > > dynamic pages contain lots of images also served via GAE, and since
> >  > > the browser can make many requests at once to load these, the app can
> >  > > be started up on several sever instances (probably due to load
> >  > > balancing) to deliver all the images. This can add up to a huge amount
> >  > > of CPU usage for just one page.
> >  > > Basically, the more traffic your app gets the faster it will be.
> >  > > Some people have suggested using a process somewhere to automatically
> >  > > make requests once per second or so to keep apps in the cache. But
> >  > > this is surely frowned upon by Google.
>
> >  > Indeed, we are aware of this issue for some applications with certain
> >  > load characteristics. We're taking steps to improve app caching to
> >  > maximize instance lifetimes when it makes sense. Thanks for reporting
> >  > all of your experiences with this behavior!
>
> >  > -Brett
>
> --
> Barry
>
> -www.nearby.org.uk-www.geograph.org.uk-
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to