What happens when you open an app
☰
Opening an app is a relay race: find the address, open a private line, ask, and get an answer back — and almost every speed trick is about running fewer laps, or shorter ones.
+ The whole system in one paragraph− Hide
When you open an app, your phone first looks up where the app lives (DNS), opens a private connection to it (TCP and TLS), sends the request and waits. Each trip across the network costs a round trip, so the big wins are fewer trips and shorter ones: a copy of the answer close to you (a CDN).
In this lesson
3 chapters · ~5 min · a quick check in eachEverything is on this page — just scroll down ↓
New to this? Warm up first+ optional
What every request needs — and how well
Start here. Yellow notes are the four jobs every request needs done; blue ones are what 'good' means. Each piece of the trip exists for one of these.
ⓘ Details & sources− Hide details
Yellow = what has to happen. Blue = how well.
Words you'll meet
Skim these now and come back whenever one shows up.
ⓘ Details & sources− Hide details
The terms, in plain words.
The whole trip
Try it: where do the milliseconds go?
Flip the switches: an open connection skips the lookup and the handshake; a CDN copy near you makes every round trip short. Times are illustrative; the 150 ms ocean trip is real.
ⓘ Details & sources− Hide details
Every trip across the network costs a round trip. Fewer trips, or shorter ones, is the whole game.[7]
One request, in time order
The same trip as a timeline. Each arrow is a message; each pair of arrows is one round trip. Count them: that's most of the wait.
8 steps. Follow the flow one step at a time — what happens first, and what comes next.
The whole trip, on one page
Your phone asks the DNS resolver for the app's address.
A CDN keeps a copy of the answer in a server near you. What does that change on the trip?
Pick one — or just keep scrolling, it's not graded.
Keep going — it's free
Create your free account to unlock the rest of this lesson, keep your progress and pick up right where you left off.
- 2Step by step
- 3When it's slow
Ask anything about this system, or share how you'd design it.
Log in to join the conversation