Scaling / 1 / 5
Scaling up vs scaling out
A feed API outgrows its server. First it moves to a bigger box, until there is no bigger box and the one box falls over. Then it spreads over several smaller ones, and learns why that needs a load balancer and an app that remembers nothing.
- 11 min
- Beginner
- 10 steps
- Served
- 300 /s
- Latency p95
- 80 ms
- Errors
- 0 %
- Cost per month
- 160 $
- request
- reply
- redelivery
- duplicate
- lost
Numbers are a model scenario, not measurements
The real request
Users → App server 1Request
GET /feed HTTP/1.1
Host: api.example.com
Response
HTTP/1.1 200 OK
X-Served-By1: app-1
Server-Timing2: app;dur=38
X-Served-By— Which server answered. Right now there is only one.Server-Timing— 38 ms of app work. The rest is network.
Course: 42 lessons
01 Foundations
02 Scaling
03 Data & storage
04 Communication
05 Reliability
06 Architecture
07 Security
08 Shipping
09 Whole systems
10 Business processes