Skip to content

// System Design · 10

Bottlenecks

Whole system slowleads toOne real constraint

The one component actually limiting everything else's speed.

How it fits together

Bottlenecks structure«client»ClientCheckout APICPU 22%Orders serviceCPU 35%CacheCPU 12%Orders DBCPU 100%connections 98 / 100p99 3s1 request2 call3 query4 timeoutscache reads
uses / callsfails / error path· numbered steps replay in order
  • Client uses / calls Checkout API (1 request)
  • Checkout API uses / calls Orders service (2 call)
  • Orders service uses / calls Orders DB (3 query)
  • Orders DB fails / error path Orders service (4 timeouts)
  • Orders service uses / calls Cache (cache reads)

Spot it

  • Adding servers did not make it faster
  • One resource sits at 100% while others idle
  • Fixing one slow thing just moved the slowness

It costs

Optimising anything other than the bottleneck is wasted effort, and fixing it reveals the next one.

Go deeperThe full explanation and what to ask for · 1 min readExpand

A system is only as fast as its narrowest point. Speeding up a non-bottleneck changes nothing the user can feel.

Measure before guessing. The USE method checks every resource for Utilisation, Saturation and Errors; it's quicker than intuition.

Common culprits: the database, a connection pool that is too small, lock contention, N+1 queries, and synchronous calls to slow third parties.

Ask for it

  • profiling
  • saturation
  • connection pool
  • N+1 queries
  • USE method

Profile this request end to end and show where the time goes. For the top resource, report utilisation, saturation and errors before proposing any fix.