MediumScenarioScaling and reliability scenarios
Your database CPU is at 90% during peak. What do you do in order?
What a good answer covers
Find top queries, add indexes or fix N+1, cache reads, add read replicas, then consider partitioning or sharding.
PreviousDesign a multi-tenant SaaS with noisy neighbours.Next A cache failure sends all traffic to the database and it collapses. How do you prevent this?