Memcached Flashcards

1
Q

Characteristics

A

Distributed key-value store (hashtable)
Limited size – key,value pairs are discarded when cache is full
* Cache eviction policy: LRU (least-recently used).
* More details: cache divided in HOT, WARM and COLD; new
items enter the HOT; cache eviction moves object to the
lower level.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Designed for

A
  • High-throughput servers – accessing memory is much faster
    than disk.
  • High-latency queries – avoid repeating costly queries.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Architecture

A
  • Clients know about all servers.
  • Clients know the hash function to assign a key to a server.
    Can use consistent hashing.
  • Clients send operations to the server that will hold a given
    key directly.
  • Servers maintain a “key-value” store.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Memcached limitations:

A

On a cache miss, multiple clients may end up trying to set the
value of a cache entry.
For a value updated very frequently, writes may be reordered
and the old value get written in the cache.
Solution [from Facebook]:
* Clients get leases for writing the value of a key. This
guarantees that a single client writes at a time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Memcached Limitations: No Replication

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly