Inkwell Blogs now has an archive: every post anyone has ever published, 200 000 of them. Readers arrive from search engines, each to a different old post, so no post is much more popular than any other. The database can't keep up, and the database team's plan is a big cache in front of it.
What it does
- Read: a reader opens an archived post.
- Write: an author fixes a typo in an old post.
Workload
A steady 12 000 rps, 99% reads / 1% writes, for 15 seconds, over 200 000 posts. Every post is about as likely to be read as any other.
How to build it
The app tier is fixed: twelve medium replicas behind a load balancer. Database nodes go up to the medium tier, as before. You can add read replicas, a cache, or both.
- Build the path: client, load balancer, app server, database. Run it as it is.
- Try the team's cache, then select it and check its hit rate under Metrics.
- Spend the money where it takes load off the database, and nowhere else.