Resilient Cache Architecture with Azure Redis
A production-grade caching blueprint covering cache-aside pattern, write strategies, TTL governance, and the failure handling most teams forget: what happens when Redis itself goes down.
Caching is the most common performance optimisation in enterprise systems and the one most frequently implemented in a way that creates a new single point of failure. The question that separates a resilient cache from a fragile one is simple: what happens to your application when the cache is unavailable? If the answer is "it goes down too," you've added a dependency, not a cache.
What happens to your application when the cache is unavailable? If the answer is "it goes down too," you have not added a cache — you have added a new single point of failure with a faster read path.
When to Use This Pattern
- ✓Read-heavy workloads where the same data is requested frequently
- ✓Expensive-to-compute or expensive-to-fetch data (aggregations, joins, API calls)
- ✓Session storage requiring fast access across distributed application instances
- ✓Workloads that can tolerate eventual consistency on cached data
- ✗Write-heavy workloads where cache invalidation overhead exceeds the benefit
- ✗Data requiring strict real-time consistency (financial balances, inventory counts)
- ✗Datasets small enough to hold in application memory
- ✗Cases where you cannot tolerate stale reads even briefly
The Cache-Aside Pattern
Cache-aside (lazy loading) is the default pattern for most enterprise caching. The application checks the cache first; on a miss, it reads from the source, populates the cache, and returns the result. The key resilience property: the source of truth is always the database, never the cache. The cache is an optimisation, and the system functions correctly (if slower) without it.
Get the Cache Architecture Decision Guide
The cache strategy comparison table and Cache Resilience Test — as a one-pager for your infrastructure review.
Write Strategies
How writes interact with the cache determines your consistency guarantees. Cache-aside with invalidation (delete the cache entry on write, let the next read repopulate) is the safest default. Write-through (update cache and database together) gives stronger consistency at the cost of write latency. Write-behind (update cache, async to database) gives the best write performance but risks data loss — rarely appropriate for enterprise systems of record.
| Criterion | Cache-aside | Write-through | Write-behind |
|---|---|---|---|
| Consistency | Eventual (safe default) | Strong | Weak (async) |
| Write latency | Low | Higher | Lowest |
| Data loss risk | None | None | Possible on crash |
| Complexity | Low | Medium | High |
| Best for | Most enterprise systems | Read-heavy, consistency-critical | High-write, loss-tolerant |
Production Checklist
- 01Configure Redis with replication and automatic failover
Azure Cache for Redis Premium tier with a replica. Without a replica, a primary failure means a cold cache and a database load spike during repopulation.
- 02Implement a circuit breaker around cache calls
When Redis is unavailable, the circuit breaker routes reads directly to the source database — degraded performance, but the system stays available. This is the single most important resilience pattern for caching.
- 03Set TTLs deliberately, with jitter
Every cached key needs a TTL appropriate to its data's volatility. Add random jitter to TTLs so that keys created together don't all expire simultaneously and cause a synchronised stampede.
- 04Prevent cache stampedes on hot keys
For frequently-accessed keys, use a per-key lock or probabilistic early recomputation so that only one request refreshes an expired key while others serve slightly stale data.
- 05Monitor hit rate, latency, and evictions
A falling hit rate signals a TTL or sizing problem. Rising evictions mean the cache is undersized. Both degrade silently until they cause a database load problem.
There are 9 more like this. Plus AI advisors that go deeper.
Sign up free to get new research in your inbox, download frameworks as PDFs, and try the Cloud Architecture Advisor — AI that personalises this guidance for your specific situation.
The Leadership Brief
Weekly practitioner intelligence — platform engineering, AI, cloud architecture. Every Monday. Free forever.
Downloadable frameworks
Platform Gravity Model™, IDP selection flowchart, AI Deployment Ladder — as one-pager PDFs for your team.
Early access to research
New reports and frameworks reach members before public release.
1 free AI Advisor question
Try a Reymentos AI Advisor on what you just read. No subscription needed to try.
Free forever · No credit card · Unsubscribe anytime · $39/mo for AI advisors