A distributed caching and cache-filling library for Go, designed as a replacement for memcached clusters.
groupcache is a distributed caching and cache-filling library written in Go, designed to replace memcached clusters in many scenarios. It coordinates cache fills to prevent thundering herd problems and automatically mirrors hot items across processes. The library acts as both client and server, forming a peer-to-peer cache network without requiring separate cache servers.
Go developers building distributed systems that require efficient, coordinated caching to reduce database load and improve performance. It's particularly useful for teams managing memcached deployments who want to simplify infrastructure.
Developers choose groupcache because it eliminates the operational overhead of separate cache servers while providing intelligent cache-filling coordination that prevents thundering herd outages. Its peer-to-peer architecture and automatic hotspot mitigation offer better reliability and performance for read-heavy workloads compared to traditional memcached setups.
groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Acts as both client and server, eliminating separate memcached servers and reducing configuration complexity, as highlighted in the comparison to memcached.
Coordinates cache fills so only one load populates the cache on a miss, then multiplexes the value to all callers, preventing database overloads.
Mirrors super-hot items to multiple processes automatically, avoiding CPU or NIC overload on single machines, a feature not found in standard memcached.
Uses consistent hashing to shard keys across peers, ensuring efficient key distribution and ownership for load balancing.
Cache entries are immutable with no support for expiration times or explicit evictions, limiting use to data that rarely changes.
Only available for Go and unlikely to be ported, making it unsuitable for multi-language or non-Go projects.
Lacks common caching features like versioned values, CAS, and increment/decrement, which are standard in alternatives like memcached.
groupcache is an open-source alternative to the following products: