Boss lesson · Unit 04
Design it
A site, an API, a database and files: survive a zone, price it, name the parts
What you practise
- A small product (site, API, database, files) laid out on the cloud, a zone failure survived, the bill estimated, mapped to both AWS and Cloudflare building blocks
Try a question from this lesson
Pick one
A photo-sharing product runs entirely on one virtual machine in one zone. Which single event loses customers' data for good?
users --> [ one virtual machine ]
site + API + database
uploaded photos on its diskCorrect answer
The machine's disk dies
Why
A spike or an expired certificate makes the site slow or unreachable, and then it comes back. The disk holds the only copy of the database and every photo. State on one machine is the first thing to fix.
The idea
Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.
Concept
The target design
The CDN serves the site's files and passes API calls to a load balancer.
The API runs in two zones and keeps nothing in memory that matters.
The database has a primary in zone a and a standby in zone b.
Photos sit in object storage, which already spans zones.
State lives in exactly two places: the database and the bucket.
users --> CDN --> site files (bucket)
|
v
load balancer
/ \
API zone a API zone b
\ /
database a --> standby b
photos: object storage11 more exercises in the app
- 3× match the pairs
- 1× order the lines
- 4× multiple choice
- 1× type the answer
- 1× true or false
- 1× fill the blanks
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.