Part 7 of 9 · 1 min read
One tiny design, start to finish
The bakery shop designed in five small steps, with one number and one trade-off.
This section shows the whole habit once, on a very small system. Later levels repeat it on bigger ones.
Step 1: Ask. What must the shop do? Customers browse cakes and place an order. The owner sees the list of orders. About 2,000 orders arrive each day. (These numbers are made up for the example.)
Step 2: Do one number. A day has 86,400 seconds. So 2,000 orders a day is about 2,000 ÷ 86,400, which is roughly 0.02 orders each second. Busy times may be ten times heavier, so about 0.2 orders each second. That is one order every five seconds.
Step 3: Draw the first design. One client, one server, one data store. That is all.
Step 4: Check the number against the design. One ordinary server can handle hundreds of requests each second. The shop needs a fraction of one. A bigger design would be over-engineering.
Step 5: Name the weak spot and one trade-off. With only one server, a server crash stops all orders. Adding a second server gives safety at the price of more money and more things to keep in step. The design says plainly: "Accept the risk now. Add a second server when an hour of lost orders costs more than a second server."
Read it as
The design is not the drawing. The design is the drawing plus the numbers plus the reasons.
Check yourself:
- What would the number in step 2 look like at 2,000,000 orders a day?
- Which part of the design would you change first if the shop grew that large?