Wednesday, February 1, 2012

Re: Terrible performance when deployed to GAE

When I was trying it I got the impression that the MySQL instance(s) would be created / killed depending on the load.

What I mean is that whenever I let the test application rest for a while, presumably the SQL instances were killed and next time I tried to issue a request it would take several seconds for the MySQL to start accepting connections again. 

I also suspect that it takes long time because the operation of instantiating a new SQL instance may involve copying the entire database (presumably saved in the form of a protobuffer somewhere) to the actual virtual instance that runs the MySQL process that ultimately answers the queries.

I can see how this could be the case as they may not want to waste resources keeping an instance alive that is just sitting idle all day.

If this is really the case, it shouldn't be a problem in production as the load would be continuous (hopefully :)). If your load is on/off, what you can do is set up a warm-up request in GAE via a cronjob, to issue say one request per minute to your application, with the sole purpose of preventing the database instance from being killed when there's no load.

You can also use the cron technique to validate the theory above, if you do, please post your findings in the group,

Hope this helps,

Reinaldo


No comments:

Post a Comment