13

We have narrowed our choices for caching down to memcached and redis in our application. We already have considered and will apply Output Caching in our application. My question is what is your experience with both and which one should I prefer?

We are expecting about 400000 users later on hence we are thinking of caching and we are in process of optimizing our application by profiling and fixing queries. We also considered Ncache but because of price its out of contention. At the same time we think that memcached and redis will perform equally for free.

But what would be a better option for caching keeping in mind we are using asp.net mvc 2, sql server 2005 and entity framework 4? Are there issues that I should be aware of with any of them ?

Any suggestions or ideas are welcome! Thanks a lot.

Vishal
  • 12,133
  • 17
  • 82
  • 128
  • Another option to consider is Microsoft's AppFabric. If you guys are a MS shop this might be a good option for you. I wonder if you guys considered and discarded it or maybe it wasn't a good fit (?) http://msdn.microsoft.com/en-us/windowsserver/ee695849.aspx – Hector Correa Nov 04 '10 at 17:39
  • If NCache was your preferred choice and you are expecting 400,000 users I think $1995 is not too bad an investment. Remember "free" software is __absolutely fantastic__, but only if (in the long run) it will save ! – JcMaltaDev Nov 04 '10 at 18:13
  • Yea..I haven't myself looked into AppFabrice..but my boss has I think will get back to you...while Ncache cost i have suggested it..but I guess we thought memcached and redis will perform the same for free..but maybe we need more research on this.. – Vishal Nov 04 '10 at 18:20

1 Answers1

8

memcached and redis differ quite a bit.

Memcached is completely in memory and will lose all of its cache in case the server is restarted.

Redis is persistent, and on top of that has a lot more features (like set operations, lists, counters, etc).

Since you're only talking about a cache, memcache might be the better fit since it's dedicated for just that.

We use memcache for a lot of things and what it does it does good. If it turns out later that you need persistence, you can always switch for memcachedb which uses the same mecache protocol but has a berkelydb backend

Toad
  • 15,593
  • 16
  • 82
  • 128
  • 1
    As a plain key-val cache Memcached is good indeed, but if you need more and persistence I suggest using Redis as memcacheDB is not going to work well, search for instance to how Reddit guys had big problems using it. It is not even remotely able to scale to what Redis/Memcached numbers usually are. – antirez Nov 05 '10 at 21:22