1

I use memcached to save about 5MB data. About forty percent of the data updates ever seconds, that causes about 280 qps between memcached client and server, with get and set each takes half of the queries. Except the realization of such great data transaction, I also meet the HA problem.

Before I choose memcached, I've also looked at Redis. But it seems to be only one thread and not likely to performs well on data persistence. Also the client for Redis is not that easy and reach when it stands with Memcached.

But how can I do HA with memcached? How should I keep data duplication between the Master and slave memcached server; And when a memcached server crashed, it follows with the data consistency problem. Are there already some good tools for memcached HA, or if there is a better NoSql Database instead of memcached?

chrislovecnm
  • 2,549
  • 3
  • 20
  • 36
annawhite
  • 29
  • 1
  • 4
  • Hi - I think your question might be better posted on a forum like stackexchange.com (for sys admins) rather than stackoverflow (programming-related questions). You might also be interested in this thread: http://www.mail-archive.com/memcached@googlegroups.com/msg07175.html – paulsm4 Apr 19 '12 at 16:28
  • 1
    memcached is a cache, not a NoSQL store. Your data may be evicted at any time when max memory is reached. You need stable storage to be used with memcached. If you still want to store your stuff in memcached have a look at what the CouchBase guys did (i.e. the virtual bucket mechanism). Oh, and your comments about Redis are just ridiculous (a single Redis instance can support 200+ Kqps with no issue on modern hardware, so your 280 qps would barely impact it). – Didier Spezia Apr 19 '12 at 16:30
  • @DidierSpezia running memcached with -M prevents data getting evicted. From man page `-M Disable automatic removal of items from the cache when out of memory. Additions will not be possible until adequate space is freed up.` – seppo0010 Apr 19 '12 at 17:26
  • True - I didn't remember this option. Thanks for the heads up! – Didier Spezia Apr 19 '12 at 21:23

1 Answers1

0

Maybe you can use repcached(repcached.lab.klab.org) or magent(https://code.google.com/p/memagent/)

billow
  • 125
  • 1
  • 1
  • 9