Design a Distributed Cache
In IBM's senior loop this design rarely arrives as "design a distributed cache" on a blank board. It usually comes in two moves. First the interviewer asks you to implement a Premium question in code, correct and O(1), the classic hash map plus doubly linked list. Once that works, the interviewer says now make it distributed. One box can't hold the whole working set or take the load, so how do many of them act as one cache? IBM likes that climb from a single class to a fleet inside one question, and it's why the LRU from the coding round comes back here.
Keep the scale honest. This is an enterprise cache that fronts a database, a Db2 instance or a service's own store, and it exists because that database can't serve the read rate the application throws at it. Most of the design pressure comes from the fleet changing shape, more than from raw throughput. A scale-up adds a node, a node dies at three in the morning, or a deploy restarts the whole tier, and any of those can turn a warm cache cold. A cold cache sends its full read load straight at the database it was protecting. IBM cares far more about how gracefully the cache gets through that than about whether it can serve billions of reads.
IBMPremium lesson · System design round
The IBM design, worked end to end.
- The API and data modelSystem design · Frequently asked
- The design, drawn out1 diagram
- 4 deep divesWith the tradeoffs
$49 a year · all 100 companies · cancel anytime
From 328 IBM reports, forum threads behind logins and write-ups in Chinese.
IBM interview guideKnow what IBM asks before you walk in.
14 coding · 3 system design · 13 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.