Bottleneck
The slowest part of a system, the one holding all the others back. Improving any other part barely changes the total time.
Example
A page takes 2,000 ms and 1,800 are one query: that query is the bottleneck.
Test yourself: Bottleneck
Measure and optimize
The page takes 2,000 ms and the query 1,800. If you make the web server twice as fast (50 to 25 ms), how long does the page take?
You only save 25 ms: 2,000 - 25 = 1,975. As long as the query stays at 1,800 ms, the page can't go below that.
The design steps
Your design has 1 single database with no replicas. What problem is that?
With 1 more replica, if the primary falls, the other takes over in seconds.
0/2
â–¶ PlayLessons that use it
What system design is
Think before you build
Scaling
Bigger or more machines
Replication
Copies of the database
Measure and optimize
Measure first
Consistent hashing
A ring to split the load
Service bus (ESB)
One hub to integrate everything
API Gateway
1 single front door
Rate limiting
A cap on requests
The design steps
From data to bottlenecks
Designing a URL shortener
A long link in 7 characters
