A product catalog serves 100 reads per write. Add a cache-aside (lazy loading) layer so reads hit the cache first.
Cache-aside checks the cache before going to the database; on a miss, it fetches from the DB and writes the result to cache for future reads. The payoff is direct: repeated reads are served from memory, so latency drops from tens of milliseconds to sub-millisecond and the database stops receiving most queries — sustaining traffic spikes without scaling the DB. Use it for read-heavy workloads where the same data is requested repeatedly and a small staleness window is acceptable, such as catalogs and profiles; avoid it when every read must reflect the latest write without any delay.
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.