"Should we shard or add replicas?" comes up in almost every growing team, usually during an incident. The question is framed as a choice between two technologies, but the real question is which resource is running out. Replication, partitioning and sharding each relieve a different bottleneck, and each one adds a cost you will keep paying for years. This guide is the checklist we use when a Postgres database starts to hurt. It begins with measurement, maps each bottleneck to the option...