Code RoomContent safety inference at scale
HardPrep Room Coding #3478

Content safety inference at scale

System designML systemsSenior–Staff~45 min

Design the online inference path for a content-safety classifier that must score every user-generated post before it's shown, at 120k QPS with a hard 15ms p99 budget — if scoring is slow it stalls the publish path for real users. The model is a transformer classifier on GPU; naive per-request inference is too slow and too expensive. Walk through how you hit the QPS at that latency, how dynamic batching interacts with the tail-latency budget, and how you degrade gracefully if the model fleet is overloaded rather than blocking every post.

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:00 left
Estimate5:00 planned
Design15:00 planned
Deep dive12:00 planned
Failure8:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.