Scenario
A news site. Article pages are read about 6,000 times a second at peak, and writes run at about 200 a second — editors publishing and correcting, readers commenting, and a view counter on every article. Articles, comments and counters all live in one SQL database, which is now the ceiling: it sits at 90% CPU all evening, and a page read that used to take 20 ms takes 300 ms.
Requirements
Constraints
- one region, three availability zones
- the SQL database stays the source of truth; no move to another store
- article pages are personalised — the reader's name, and which comments they have voted on — so one cached copy cannot be served to everybody
- two engineers, no dedicated ops
Hints