How does the group cache in Go compare to redis and memcached?

I was wondering if anyone with real life experience in group cache and other memory caching tools like redis and memcached knows how they compare to each other in terms of performance, ease of use, and other areas that worth mentioning.

The reason I am asking is that I am interested in a full switch to Go, but I don't have much experience with it and no experience with group cache.

+3


source to share


3 answers


Groupcache is not intended to be a complete replacement for Redis or Memcached. For example, Groupcache does not support updating or deleting an item.

This is useful for hot items that you want to cache but are immutable.

In addition, compared to Redis, it does not support any of the additional features supported by Redis as it has a different intended use case.



If you don't have such things, I would recommend using Redis or Memcached.

Indeed, if you can trick your implementation into making each element immutable by following some logic (perhaps refer to the elements with a key that includes a timestamp?), Then you might be able to work around it, but I'm guessing that it might be too much work compared to using other solutions.

Hope it helps.

0


source


There are excellent Go clients for Redis and Memcache. There is no reason to manage these tools because you are using Go.



Choose the tool that best suits the functional 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 is 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.

+3


source


Currently groupcache is a library written in Go, whereas there are many language bindings for redis, etc.

groupcache was originally built to work with blocks of binaries for google static file servers.

groupcache was originally written by the author of memcache, Brad Fitzpatrick.

See also the author's Groupcache mention in the presentation of the dl.google.com rewrite from C ++ for the transition .

+2


source







All Articles