用 Go 發展的 groupcache...

groupcacheBrad Fitzpatrick 最新的作品 (之前最有名的兩個作品是 memcachedOpenID 1),目標在於取代一部分 memcached 的功能。

以官方的說明是:

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

另外一篇介紹文是「Playing With Groupcache」。

跟 memcached 差異最大的地方在於「沒有更改與刪除的功能」,一旦寫進去後就不會變動。在放棄 update/delete 的特性後,換來的是:

  • Cluster 的能力。
  • 處理熱點的能力。

以往在 memcached server 之間是沒有交集的,在 groupcache 則是 cluster 起來。另外以前在 memcached 會因為同時存取同一個 key 而造成 single CPU overloading 的問題,在 groupcache 則透過 auto-mirror 機制解決。

不過還是得想一下要怎麼用,畢竟沒有 update/delete 功能...

One thought on “用 Go 發展的 groupcache...”

  1. So it focus on "write-once, read-many" and only such usage... May be cache for a static URL, image, comment, and "append-only" data strucure?

Leave a Reply

Your email address will not be published. Required fields are marked *