One name change followed through a cold cluster

video locked
Enroll to watch

4 mins

Chapters
About
Discussion0
Notes
Be the first to start a conversation!

A cold cache is a cache whose hit rate is under the threshold at which it is called warm.

A user changes his name at a Facebook web server that has a cold cache and a database. A warm cache stands in another cluster.

  1. The web server deletes the user's entry in its own cache and sets the new name in the database.
  2. The user refreshes the page. The web server goes to mcrouter, which hits the warm cache, because the probability of finding the entry there is high.
  3. The warm cache still holds the old name. Till now there is no problem.

Deleting from the warm caches as well means deleting from all clusters in the world. One database update hits clusters in India, the US and the UK, and waits for the responses. So only one cluster is hit at a time, letting go of consistency for latency.

Mcsqueal corrects the warm side. It broadcasts the update to all databases and to the caches that care about the value, and the entries become consistent again.