Inkwell's new home page shows a writer's notes, from the database, and a box of recommendations, from a key-value store another team runs. The store usually answers in a few milliseconds, but now and then it takes a quarter of a second or more, and the page waits for it.
The product team's budget: 99% of requests under 100 ms, and recommendations shown on almost every page.
What it does
- Read: a writer opens the home page: their notes, and recommendations.
- Write: a writer saves a note.
Workload
A steady 1 000 rps, 90% reads / 10% writes, for 20 seconds, against 10 000 notes.
How to build it
- Build client, load balancer, app server. Connect the app server to a relational database (notes) and a KV store (recommendations).
- Run it and look at the p99.
- Select the connection from the app server to the KV store. Decide whether the page really needs it (If it fails: fail the request, or skip it) and how long it should wait (Timeout).