Code RoomStale permission prevention at scale
HardPrep Room Coding #4598

Stale permission prevention at scale

System designSecurityDatabases & SQLSenior–Staff~50 min

Design the consistency guarantees for a distributed, heavily-cached authorization service where the dangerous bug is the 'new enemy' problem: Alice removes Bob's access to a document AND simultaneously adds sensitive content, but because permission checks are cached/replicated with lag, a stale check still says Bob can read — so Bob sees content he was just locked out of. The service answers ~2M checks/sec from caches and replicas across regions. Design how you prevent stale-permission leaks WITHOUT making every check a strongly-consistent cross-region read (which would blow latency). Discuss consistency tokens, causal ordering, and where you accept staleness vs where you must not.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify5:30 left
Estimate5:30 planned
Design16:30 planned
Deep dive13:30 planned
Failure9:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.