Background of Distributed Cache
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:
| Topic | Design question |
|---|---|
| Writing policy | Which copies are updated before a write succeeds, and what happens if only one update completes? |
| Eviction | Which entries should give up limited memory when a new one arrives? |
| Invalidation | How does a reader stop using a value after its source changes? |
| Storage | Which node owns a key, and how is it found within that node? |
| Cache client | Who 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.