Anthropic·Software Engineer·Onsite - System Design / Architecture
Jun 2026
System design round at Anthropic for a software engineer role, focused entirely on one deep problem: making an in-memory LRU cache survive crashes and restarts. The question had a lot of layers and the hints they gave mid-interview made it clear they wanted you to reason through trade-offs, not just recite a solution.
- You have an in-memory LRU cache with O(1) get/put. Right now it's fully volatile. Design a persistence strategy so the cache can recover its state after a process crash or restart, including what to persist, how to reconstruct LRU ordering, whether to use snapshots or a write-ahead log or both, and how to handle partial writes during recovery.
- The cache logic runs at microsecond speed but disk flushes take milliseconds. How do you prevent persistence from blocking live get/put traffic, and where exactly do you draw the line between synchronous and background work?
- How would you take a snapshot of roughly 1 GB of cache state without stalling live traffic for the several seconds it would take to write?
- If exact LRU eviction order after recovery were a hard requirement rather than approximate warmth, what would you change and what would it cost you?
- How does the persistence and recovery story change if you extend this to a sharded and replicated cache, where each shard has its own WAL and a follower needs to stay in sync?
“This took me a while to even frame correctly.” The rest of the author's notes on Software Engineer interview at Anthropic, Onsite - System Design / Architecture round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post