Cache
memcache
memcached
- what:使用LRU的一个巨大的hashtable。定时遗忘,high throughput
- why:集合很多web server 的内存, use memory is fast and low latency
- how: 出问题回disk找
- problem:没有稳定的存储
- handle common problem, much simple
- Designed for volatile data
- failure: just go to disk
- recovery: just turn back on and wait. repopulated again
redis
REmote DIctionary SErver
- what: 支持多种数据类型,LRU,稳定存储
- why: 解决同样的问题
- how:定时写回disk,持久。
- simple client: ask any node and get redirected.(redirected may take long time)
- smart client: know the map, return this to the client(map maybe useless later)