Chapter 01 · One database is not enough01 / 22

Every query hits one machine

This is the database behind a small payments app: one Postgres server holding every account. The tiny table inside shows two rows from it, Alice's and Bob's balances.

Every page your app server renders turns into queries. Most are reads (cyan: show a balance, list transactions). A few are writes (orange: a deposit, a payment). Real apps often read ten to a hundred times more than they write.

One machine can only answer so many queries at once. Drag the read traffic up and watch the queue form in front of it.

Try it
Reads2.5 /s
quietbusy
served 0.0/serrors 0