Code Room
System designHardsd-g231
Subject Authorization at scaleLevel Senior–Staff~40 minCommon in Security · Distributed systems interviewsIndustries Technology, Software development

Question

Design the permission layer for a team chat product where access to a channel depends on workspace membership, channel membership, and per-channel role, and the UI must render 'which of these 2,000 channels can I see?' on app load in under 200ms. Membership changes constantly (people added/removed from channels), and a removed user must immediately lose the ability to read new messages. Walk through how you store and evaluate channel access, how you serve the bulk 'list my visible channels' query fast, and the invalidation problem when membership changes.

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.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.