4 lessons
Direct database calls, and why they work at first
What a database connection actually costs, and why calling it straight from your app is the right first design, not a mistake.
Slow queries and why indexes matter
The math of scanning a table row by row versus jumping straight to the answer, and how indexes make that jump possible.
Read replicas and splitting reads from writes
What to do once queries are fast and connections are pooled, but the single database machine still can't keep up with read volume.
Vertical vs horizontal scaling
The two fundamental directions any system can scale in, what each one actually costs, and why nearly every real system eventually needs both.