golang/groupcache

Name: groupcache

Owner: Go

Description: groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases.

Created: 2013-07-22 21:55:07.0

Updated: 2018-01-17 18:54:32.0

Pushed: 2017-11-08 01:06:55.0

Homepage:

Size: 68

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

groupcache

Summary

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/golang/groupcache

Comparison to memcached
Like memcached, groupcache:
Unlike memcached, groupcache:
Loading process

In a nutshell, a groupcache lookup of Get(“foo”) looks like:

(On machine #5 of a set of N machines running the same code)

  1. Is the value of “foo” in local memory because it's super hot? If so, use it.

  2. Is the value of “foo” in local memory because peer #5 (the current peer) is the owner of it? If so, use it.

  3. Amongst all the peers in my set of N, am I the owner of the key “foo”? (e.g. does it consistent hash to 5?) If so, load it. If other callers come in, via the same process or via RPC requests from peers, they block waiting for the load to finish and get the same answer. If not, RPC to the peer that's the owner and get the answer. If the RPC fails, just load it locally (still with local dup suppression).

Users

groupcache is in production use by dl.google.com (its original user), parts of Blogger, parts of Google Code, parts of Google Fiber, parts of Google production monitoring systems, etc.

Presentations

See http://talks.golang.org/2013/oscon-dl.slide

Help

Use the golang-nuts mailing list for any discussion or questions.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.