The interview problem

Practice prompt

One optional downstream service consumes every worker and makes unrelated endpoints fail. Design resource isolation with useful degradation.

Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.

1. Scope and worked approach

Assume shared frontend capacity and separately identifiable dependencies. Allocate bounded connection pools, concurrency permits and queues per dependency or risk class. Reserve capacity for essential paths and return an explicit degraded result when an optional pool is full. Apply deadlines before queueing and propagate cancellation. A circuit breaker can stop repeated failing calls, but isolation must also bound slow calls that technically succeed.

2. Trace the design or derivation

Classify dependency
  → acquire bounded permit
  → call with deadline
  → degrade or complete
  → release

Release permits on cancellation, exceptions and connection failure, not just successful responses. Instrument queue time separately from service time. During an outage, a fast rejected call can lower average latency while increasing user failures, so evaluate useful completions and degradation rate alongside timing.

3. Calculate the example

A pool of 200 workers is shared by two dependencies. If optional calls occupy 180 workers, only 20 remain for critical work. Capping optional occupancy at 40 preserves up to 160 worker slots, although CPU and memory may still be shared bottlenecks.

4. Failure cases and trade-offs

A separate thread pool does not isolate shared database connections or heap growth. Excessively small partitions waste capacity; borrowing improves utilization but needs enforceable reclamation. Do not label a partial response complete when the omitted dependency changes its meaning.

5. Validation, follow-ups and self-review

Hold optional requests open and verify critical latency plus bounded queues. Follow-up: how would you allocate limits across many tenants? Self-review: identify every shared resource and define the degraded response contract.

Sources and related practice

Technical reference: www.envoyproxy.io — Resource limits for upstream connection and request isolation.

Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.

Continue with Route around failing service dependencies; Bound database concurrency behind a connection pool.

Continue your preparation

Choose a connected learning path or browse more System design questions. Read our editorial method and attribution policy.