I was wondering if anyone with real life experience in groupcache and other memory caching tools such as redis and memcached knows how they compare to each other in terms of performance, ease of use, and other areas that are worth mentioning.
The reason I am asking is because I am interested in completely switching over to Go, but I don't have much experience with it and no experience with groupcache.
Memcached is designed for simplicity while Redis offers a rich set of features that make it effective for a wide range of use cases. Understand your requirements and what each engine offers to decide which solution better meets your needs.
Redis uses a single core and shows better performance than Memcached in storing small datasets when measured in terms of cores. Memcached implements a multi-threaded architecture by utilizing multiple cores. Therefore, for storing larger datasets, Memcached can perform better than Redis.
groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases. For API docs and examples, see http://godoc.org/github.com/mailgun/groupcache.
Currently, groupcache is a library written in Go whereas there are many language bindings for redis, etc.
groupcache was originally created to serve blobs of binary files for Google's static file servers.
groupcache was originally written by the author of memcache, Brad Fitzpatrick.
See also mention of Groupcache by the author in a presentation of the rewrite of dl.google.com from C++ to Go.
Groupcache is not meant to be a full replacement for Redis or Memcached. Groupcache for example doesn't support updating an item or deleting it.
It's useful for "hot" items that you want to cache but are immutable.
Also, compared to Redis, it doesn't support any of the advanced features that Redis supports because it has a different intended usage scenario.
Unless you have such things, I'd recommend to stick to using Redis or Memcached.
Indeed, if you can trick your implementation into making each item immutable by following some logic (maybe address the items by a key which includes a timestamp?) then you might be able to work-around it but I guess it might be too much work compared to just using other solutions.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With