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
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
saves 404 ms at the median
Waterfall timeline
mean elapsed time, segment by segment
Network activity
per-call breakdown, like a browser's network tab
Latency distribution
20,000 simulated operations per model
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.