Most slow apps are not slow because of code. They are slow because of distance multiplied by round trips: a database in a different region from the server, twenty sequential queries per page, a new connection per request. The arithmetic, and the fixes in order of payoff.
Light in optical fibre covers roughly 200 kilometres per millisecond. New York to London is about 5,570 km in a straight line, so a round trip cannot take less than about 56 ms, and real routes are longer. No code beats that. You control how many times you pay it.
At 80 ms a round trip, a user far from your server waits a quarter of a second before your code runs. A CDN shortens the handshakes by ending connections near the user and keeping warm connections to your origin.
Book a free 30-minute call. You'll leave knowing what we'd do first and roughly what it costs, whether or not you hire us.
Platforms make it easy to deploy functions in one region and create the database in another. Every query then crosses the gap. A page that runs 20 queries one after another spends over a second on the network alone.
Illustrative. Measure your own with a timed query from the server.
Put the server and the database in the same region, the one nearest most of your users.
Cut round trips: fetch related rows in one query rather than one per item (the N+1 problem), batch writes, run independent calls in parallel.
Reuse connections: keep HTTP clients and database pools alive between requests.
Serve static assets and cacheable pages from a CDN.
Only then consider edge compute, read replicas elsewhere or a multi-region database. Each adds consistency and cost tradeoffs.
Once a month: what changed in tech that month and what it means for you, from cloud and AI to security and the tools you build with. Every item links to its source. No sales pitch, unsubscribe in one click.
Book a free 30-minute call about it. Bring your setup and your bill; you'll leave knowing what we'd do first and roughly what it costs, whether or not you hire us.
Or keep reading
HTTP Caching and CDNs for the Person Paying the Bill
Cache-Control decides what browsers and CDNs keep, for how long and for whom. Right, and most traffic never reaches your server. Wrong, and you either pay for every request or show one user's page to another. The directives that matter, four recipes, and what CloudFront charges when the cache misses.
Read
Your App Has Users Now: The Internet Underneath It, on One Page
Building fast skips the parts of the internet that only matter once people depend on you: DNS, certificates, email authentication, caching, timeouts, backups and abuse. What happens between someone typing your domain and your database answering, what breaks at each step, and the order we would fix things in.
Read
As of October 26, 2026. Provided as is, for general information, and accurate to the best of our knowledge on the date shown. Not legal, compliance, tax, financial or other professional advice. Prices, limits and vendor services change; check current vendor documentation before relying on anything here. Terms of use.