System Design
7. Caching ArchitectureAnimated
Read-Through Cache
The cache itself loads missing data.
The idea
The application only talks to the cache, which fetches from the database when needed.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
Check the in-process cache: nanoseconds.
- step:
- 1/4
- at:
- Request
1/10
The green dot is a request moving through the system.
Step by step
- 1App asks the cache
- 2On miss the cache loads from the database
- 3It stores and returns the data
- 4Next request hits
Where it is used
Simpler application code.
Watch out for
Needs a cache library or service that supports it.