Multi-tier caching.
also: multi-tier cache · caching hierarchy · cache hierarchy · layered cachingCaching at several layers (browser, CDN, API gateway, application cache, database) so most requests stop as early as possible.
the two-minute refresher
- Each layer closer to the user is faster and cheaper but harder to invalidate.
- Browser: per user. CDN: shared, at the edge. Gateway and Redis: inside your network.
- Decide what belongs where: public static content at the edge, private data deeper in.
- Invalidation has to reach every tier, usually via events plus TTLs.