Code Room
System designHardsd-g053
Subject Traffic shapingLevel Senior–Staff~45 minCommon in Distributed systems interviewsIndustries Technology, Software development

Question

Design traffic shaping for a multi-tenant async job platform (think a hosted CI or data-pipeline service). One large tenant must not starve smaller tenants, latency-sensitive jobs should jump ahead of big batch jobs, and the system must absorb bursts without unbounded queue growth. You have a pool of workers consuming from queues. Design the queuing/scheduling so it's fair, prioritized, and bounded.

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.