IO Waterfall Latency Lab

Running dependent IO on the client vs. on the server — latency vs. execution

Every dependent IO costs two things: the round-trip travel of the request (often ~50ms) and the execution once it lands (often ~5ms). Running the chain on the client pays the network round-trip on every dependent call; running the same work on the server pays it once. Tune the chain below and compare the two approaches — median and P99.

Run on the client

browser makes every call

Median

529 ms

P99 tail

695 ms

network share91%

4.2×

faster median

3.7×

faster P99

Run on the server

one round-trip, server does the rest

Median

125 ms

P99 tail

189 ms

network share61%

saves 404 ms at the median

Waterfall timeline

mean elapsed time, segment by segment

8 dependent IOs
Run on the client528 ms
P99
Run on the server124 ms
P99
0188375563750elapsed time (ms) →
Client round-trip latencyServer-side hopExecution (work)

Network activity

per-call breakdown, like a browser's network tab

mockup
0188375563750
01Auth check
66.0 ms
02User service
66.0 ms
03Profile DB
66.0 ms
04Feature flags
66.0 ms
05Cache lookup
66.0 ms
06Recommendations
66.0 ms
07Pricing API
66.0 ms
08Inventory
66.0 ms
Client round-tripServer-side hopExecution
8 requests · 528 ms total

Latency distribution

20,000 simulated operations per model

Run on the client
P50P90P990125250375500625750
median 529 msP99 695 msworst 804 ms
Run on the server
P50P90P990125250375500625750
median 125 msP99 189 msworst 248 ms

What this means

When the chain runs on the client, the browser makes 8 dependent calls, so it pays the 60.0 ms round-trip 8 times — the median lands at 529 ms and P99 at 695 ms. Running the same chain on the server pays that round-trip once and replaces the other 7 with near-free in-region hops, dropping the median to 125 ms and P99 to 189 ms. Execution time is identical in both — only the travel changes.