Search code examples
google-app-enginememcachedinstances

GAE: memcache: is it the same across multiple app instances


I have a pretty basic question: In GAE, if I use memcache to store some data once it was retrieved for the first time from the db, if then that data remains in the cache for like 2 days, do ALL instances of said application get to "see" it and retrieve it from cache? Or is the cache separate for each application instance?

I'm asking this because I've seen that due to the way that GAE spawns separate VM processes (not threads) for each new instance an application needs, stuff that used to be consistent across all instances (in the thread model) is now fragmented per instance (process): like the servelet application context which is NOT propagated across all instances of the same application.

So, again, is memcache consisten across multiple instances of the same application, or does it create per instance/process sets of cached data?


Solution

  • It's consistent; GAE memcache runs as a service separate from your instances.