Code RoomDesign reverse proxy connection pooling
MediumPrep Room Coding #3439

Design reverse proxy connection pooling

System designDistributed systemsMid–Senior~35 min

Design a reverse proxy that sits in front of a fleet of slow upstream services (some upstreams have p99 latency of 3s). You're terminating 100k client connections but the upstreams can only handle a few thousand concurrent in-flight requests. Naively mapping each client connection to an upstream connection exhausts the upstreams. Design the connection model: how you pool/multiplex upstream connections, how you apply backpressure when upstreams are slow, how you avoid head-of-line blocking, and how a slow upstream is prevented from consuming all proxy resources.

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.

Clarify4:00 left
Estimate4:00 planned
Design11:30 planned
Deep dive9:30 planned
Failure6:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.