Menu
Back to Discussions

Multi-level caching: L1 (in-process) + L2 (Redis) + L3 (CDN) — is it worth it?

Ingrid Silva
Ingrid Silva
·996 views
we're currently running with a redis cache, but even with high hit rates, the 1-2ms network latency for every cache read still adds up, especially for our hottest keys. we're considering implementing a multi-level caching strategy: an in-process l1 cache for the most frequently accessed data, backed by redis as the l2, and then our cdn as l3. the main concern with l1 is cache coherence across our 20 application instances. we'd likely use redis pub/sub for invalidation events to keep l1 caches consistent, but it adds a lot of complexity to manage. is this level of caching worth the operational overhead? what are the common pitfalls for maintaining coherence in-process? we're trying to squeeze out every bit of performance we can for our critical paths, but don't want to build an unmaintainable monster.
0 comments

Comments

Sign in to join the conversation.

Loading comments...