2
votes

So basically, I am trying to decide if I should go for dedicated memcache.

My scenario is as follows: I am working on an application that provides real time analysis for some public data. I am going to maintain a total 15kb key/value memcache (20 keys, variable values) Meanwhile values are constantly changing (total keys/values around 20 updates every 3 seconds) Hits to the website will perform request for these keys (also around a request per 3 seconds)

I am assuming that 10000 users hit the website immediately, this will produce about 20 * 10000 requests each 3 seconds.

Considering the size of the memcache (relatively small), but also the number of requests produced about 7000/second (memcache key/value access), would dedicated memcache be more of "risk averse" deal for this situation. Thanks,

2
Even if you use dedicated memcache you can still experience a cache eviction , due to factors out of your control. As long as your application can run/recover from cache misses why not profile it with shared cache and then make an informed decision about what improved cache longevity vs cost. - Tim Hoffman
Currently working on it, but my main concern is high traffic vs memcache access - abad

2 Answers

2
votes

The cached data seems crucial to the correct operation of your web application. If you lost data it might be a disservice to thousands of users! Hopefully your app also periodically persists the cached data and automatically recovers from cache erasure.

Although the size of the data is small, shared memcache still has more risk than dedicated memcache of evicting some or all of the data at unpredictable times. The design must also deal correctly with partial data loss. Not only your memory pressure but also that from other applications and cloud operational factors are more likely to result in AppEngine discarding shared cache.

1
votes

With this data size you will not get any benefits from using the dedicated memcache.

The rate at which you access memcache does is not relevant for this decision.