I’m using GAE memcache to fetch a boolean on each request. This boolean is a flag to enable/disable a particular url.
If its true, everything works as normal, if its false then it sends back a particular format response.
The service is servicing about 7 requests per second, and the problem is Google seems to have introduced limits on accessing memcache and now this fetch is failing consistently at around 1 request per second since a few days ago, so this process has become totally unreliable. I’ve had to do an emergency patch remove this check from the code. But I need an alternative routine to enable/disable the service.
Using a servlet instance variable is an option, but each jvm instance will have their own so it can’t work.
Can anyone suggest a way of doing this?
There are no limits (other than sanity checks) on how often you can access memcache. In any case, though, you should never rely solely on memcache to store a value; you should always have a fallback to a permanent storage mechanism such as datastore.