'How does groupcache in Go compare to redis and memcached?
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.
Solution 1:[1]
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.
Solution 2:[2]
There are excellent Go clients for Redis and Memcache. There's no reason to rule these tools out because you are using Go.
Pick the tool that best meets the functionality requirements of your application. There is some overlap in the functionality of these tools, but for the most part they are not replacements for each other. It's impossible for a third party like me to make a recommendation between these tools without knowing a lot more about your application, production environment, experience and more.
Solution 3:[3]
There is interesting addition in the topic:
Mailgun created modified version of the original Brad Fitzpatrick's library: https://github.com/mailgun/groupcache
It provides key removals and expiry. It is also bit modernized (go modules arrived since original was born..).
Here is the blog entry which led me to it: https://www.mailgun.com/blog/golangs-superior-cache-solution-memcached-redis/
They claim to use the library on production.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | |
| Solution 3 | Wojciech Kaczmarek |
