Background of Distributed Cache

Lesson 58 of 25610 min readPremium lesson preview
In this lesson1 sections

Background of Distributed Cache

Before choosing a cluster layout, decide what a cached write means and when a value may be removed. These policies determine correctness as well as performance:

TopicDesign question
Writing policyWhich copies are updated before a write succeeds, and what happens if only one update completes?
EvictionWhich entries should give up limited memory when a new one arrives?
InvalidationHow does a reader stop using a value after its source changes?
StorageWhich node owns a key, and how is it found within that node?
Cache clientWho routes requests and handles misses, timeouts, and membership changes?

Writing policies

A cache stores a temporary copy of data that is persistently stored in a database or another datastore. A key design decision is when to write data to the cache versus the database. This choice, known as the write policy, directly affects performance and data consistency.

There are three common writing policies:

The rest of this lesson is for Premium members

Premium opens every lesson in this course, along with all questions and solutions on PracHub.