Engineering Decisions · Senior · Question 8 of 14

A PostgreSQL primary is near its limit: 95% of the load is reads, and writes are modest. Growth is steady, and the team is small. What's the next step?

Show the answer

Correct answer: Add read replicas and a cache for hot reads

Explanation

With a read-heavy load, replicas and a cache add capacity with little change to the application. Sharding fits a write load or dataset too big for one primary, but it costs cross-shard queries and operations a small team doesn't need yet. A NoSQL store fits data shaped around key access at huge scale, and a migration here would solve nothing the replicas can't.

Further reading

Problem with a question

Engineering Decisions · Senior · question 8

Test yourself

Take the Engineering Decisions · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz