Database: multi-region strategy
This course looks at the part of response time spent crossing distance before a server does any work. It covers round-trip floors between regions, the handshakes a first request pays, and why TCP slow start makes payload size a question of round trips. It compares three responses to distance: a CDN, edge functions and regional databases. It then examines where writes live, what a second region drags along (sessions, jobs, files, routing), and what this single-region application behind Cloudflare should do next.
What you'll learn
- ✓Why round-trip time sets a physical floor on response time
- ✓How handshakes and TCP slow start turn distance into several round trips
- ✓Why origin count matters more than file count when loading assets
- ✓The costs of CDNs, edge functions and regional databases
- ✓How the location of writes classifies multi-region designs
- ✓What sessions, jobs, files and routing require from a second region
The distance you cannot optimize
The other courses in this series have been about work the server does. This one is about the part of the response time that happens before the server is involved at all.
Read the full lesson free →Curriculum
7 lessonsThe distance you cannot optimize
Round-trip floors, the three round trips before application code runs, TCP slow start, and this application's single origin.
Three things you can move
Compares moving bytes with a CDN, computation with edge functions, and data with regional databases, and their costs.
Reducing round trips
Counts the round trips of a first visit and shows how deferring unused modules removed two origin handshakes.
Where the write lives
Classifies multi-region designs by where writes go and explains why a single write region fits here.
The things that follow you
Examines how sessions, background jobs, uploaded files, TLS and routing are affected by adding a second region.
What this application should do
Weighs network time against server time for this application and sets the order of changes to make.
Putting it together
Summarizes the course and asks for a time_to_first_byte model covering handshakes, request round trip and server time.