Proper setup for caching queries and user sessions only.
I'm trying to figure out the best way to use membase for my purposes. I have two high-end dedicated server I can use as nodes. I am currently using plain old memcached to store cached db queries and my user session info. I already tried using a default membase configuration with membase buckets for this, but eventually my membase server slowed down and then finally crashed -- I think because my default bucket filled up with old cached data which was persisting to disk for no good reason. I originally chose to use the membase bucket type so I could avoid losing user sessions when membase was restarted which is one of the major drawbacks to using plain old memcached, but it seems there is no obvious way to make the membase data persist to disk for only a short period of time. So, I'm looking for some guidance on how to best use membase for caching. I'm thinking of setting it up with memcached bucket types instead of membase, but I'm not sure if there's some better way to use the membase bucket type to get some short-term data persistence instead of switching to memcached buckets. Anyone care to offer advice?
How short is short term persistence? I imagine that if you are persisting for a really short amount of time and have lots of things expiring and lots of new thing coming in then this could created a lot of disk contention. Can you provide more information on what your workload looks like and how long the expiration is on you values.
Also, you can always use the memcached bucket. This bucket type basically just turns off persistence. The major plus here is that you get all of the clustering and replication features. For example, that means there is no more cold cache problem.