A read-heavy user profile service (5:1 read/write ratio) is overloading the database. Add a write-through cache.
Write-through caching updates both the cache and the database atomically on every write, keeping them permanently in sync. As a result, every read is served from cache with no risk of stale data — the database receives far fewer queries and read latency stays sub-millisecond even under write traffic. Use it for read-heavy workloads where stale reads are unacceptable; accept the trade-off that writes are slightly slower because each one must update two stores before returning.
Evaluation criteria and weights will be revealed after you submit your solution. This ensures a fair assessment of your design skills.
Draw your architecture diagram, explain your design decisions, and get AI-powered feedback.
For the best experience, design challenges on a desktop or tablet — drawing the architecture on a phone is hard.