Module 2 9 lessons 114 min
Start with a simple system
You have an idea and no users yet. Build the simplest thing that works - one server, one database - with an API and a data model.
Client
your system
Everything between the request and the response.
one machine
Reverse proxy
API server
Database
Payment provider
LB
Server
Server
Server
Redis cache
Database
Read replica
Object storage
In this module
8 Read · 1 Lab
- 2.1From requirements to requestsThree requirements, more than a dozen requests. Here's how to find them.Read9 min
- 2.2Data modelingCode gets rewritten. Data stays. Here's how to shape it.Read12 min
- 2.3IndexesYour API tells you which lookups run most. Index those, check the plan with EXPLAIN - and see what every index costs your writes.Read15 min
- 2.4Designing the APIA few basic rules that make an API easy to use and easy to change.Read12 min
- 2.5Choosing a databaseWhat each kind of database gives up, and how to pick one for your app.Read14 min
- 2.6Reverse proxyWhat a reverse proxy is, and why we put one in front of our API server.Read11 min
- 2.7How do you know it's working?Turn "fast" and "always up" into numbers you can measure: p99 instead of the average, error rate, and how close each part is to its limit.Read8 min
- 2.8Proof: one server at the dinner rushWe built it in Go and load-tested it from another machine. Where one server breaks - before and after the index.Read8 min
- 2.9Lab: Design the clinic's API and dataTurn the clinic's requests into an API, then into tables and indexes.Lab25 min