I recently complained that the new pricing forced me to take down my
own stats site. Also I noted that my minimalist app used to serve
horoscopes to my iPhone app went from about 9 $ to about 177$ per
month.

Since this app basically serves semi-static content (it's updated once
a day) I used AppEngine's memcache to serve every request. It turns
out that memcache in AppEngine has a confusing name. Due to it being
consistent across all instances is a much more slower beast than
actual memory cache. It might be free now but it hugely slows downs
your requests. If memcache gets slow to respond AppEngine will spawn
more instances.

So I just added another level of caching before memcache: a simple
python dict that stores the data in the instance itself. This
instantly reduced the number of instances back to 1 (sometimes 2).
This suddenly makes the new pricing acceptable.

Of course this kind of optimization won't work for all cases but it
works beautifully when the data doesn't have to be modified in the
cache and cannot be different on various instances.

-- 
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