Start with a Teardown Book a 20-min fit call
Knowing when

Your database is maxed out. Do you need a read replica yet?

Your database CPU sits at 80 percent every afternoon, the dashboard customers use most has started timing out, and someone has proposed adding a read replica. It sounds like a clean fix: send the reads somewhere else, and the main database breathes again.

The short answer: you need a read replica when the primary database is genuinely saturated by read traffic that you have already made efficient, or when heavy reporting queries are slowing down the product for everyone else. If the load comes from a handful of slow, unindexed queries, a replica just gives you two databases running the same bad queries. Fix the queries first, then add a replica for the reads that remain.

What a read replica is, and what it is not

A read replica is a second copy of your database that receives changes from the primary and serves read-only queries. On managed services such as Amazon RDS, replication to a read replica is asynchronous: the primary commits a change and the replica catches up shortly after.

That one word, asynchronous, is the source of most of the trouble. A replica can be behind. Usually by milliseconds, sometimes by seconds, occasionally by much more under heavy write load. A user who saves something and immediately reloads a page served from the replica can see the old value.

A replica is not:

  • A backup. If someone deletes a table, the deletion replicates. You still need real backups.
  • A write scaler. All writes still go to the primary.
  • A fix for slow queries. A query that takes eight seconds on the primary takes about eight seconds on the replica.
  • Free. It is another database instance running all the time, and you pay for it.

Check these first

Most of the "we need a replica" conversations we have joined ended with something cheaper.

Find the expensive queries

Turn on your database's query statistics (for Postgres, pg_stat_statements) and look at the top queries by total time. It is common for three to five queries to account for most of the load. A missing index or an N+1 pattern in the ORM can be fixed in a day. This is the same reasoning as in add a cache, or fix the query.

Look at connections, not just CPU

Sometimes the database is not busy, it is crowded. Hundreds of idle connections from app servers and background workers can exhaust memory. A connection pooler often fixes this without any new database.

Cache what does not change

Data that is read constantly and changes rarely, such as settings, plan details and reference lists, belongs in a cache or in application memory, not in a query on every request.

Right-size the primary

Moving up one instance size is a few minutes of work on most managed databases and is sometimes cheaper than running a second instance plus the engineering to route traffic to it. It does not scale forever, but it buys time cheaply.

Signs a replica is the right call

  • Queries are already efficient and read volume is still pushing the primary hard.
  • Reporting and analytics queries run against production and slow the product down. Moving them to a replica is the single most common good reason we see.
  • Internal tools and exports scan large tables during business hours.
  • Read traffic is much larger than write traffic, and most of it can tolerate slightly stale data.

If your reporting needs keep growing, a replica is often a stepping stone. Eventually the heavy analysis belongs in a separate store; see do you need a data warehouse yet.

The work nobody budgets for

Adding the replica takes a few minutes in a cloud console. Using it well takes engineering time.

Routing reads

Your application has to decide which queries go to the replica. The safest first step is to route only a few clearly safe workloads, such as the reporting dashboard or a nightly export, rather than all reads. Many ORMs and frameworks support a read connection, but blanket routing is where stale-data bugs come from.

Read-your-own-writes

After a user changes something, their next few reads should go to the primary, or the page should show what they just saved. Without this, users see their changes vanish and file bug reports.

Monitoring lag

Replication lag needs an alert. On RDS it is exposed as the ReplicaLag metric in CloudWatch, as described in the read replica monitoring docs. Decide what lag is acceptable for each workload and what happens when it is exceeded, for example falling back to the primary.

As a rule of thumb, routing one or two isolated workloads to a replica is a few days of work. Routing general application reads safely, with read-your-own-writes handled, is more like two to three weeks for a typical early-stage codebase. Those are planning ranges from what we have seen, not a quote.

A worked example

This is an illustrative composite. A Series A B2B analytics product had its database at 85 percent CPU every afternoon. The team wanted a replica. Query statistics showed that two dashboard queries without indexes accounted for over half the load, and a customer-facing CSV export scanned a large table on every request.

They added two indexes and moved the export to a background job in three days. Afternoon CPU dropped to around 45 percent. Three months later, as larger customers ran heavier reports, they added a replica and routed only the reporting dashboard to it. The general application never touched the replica, which meant no stale-data bugs.

FAQ

Is a replica the same as high availability?

No. A standby for failover, such as a Multi-AZ deployment on RDS, exists to take over if the primary fails. A read replica exists to serve reads. Some setups can do both, but plan them as different jobs.

Can a replica be promoted if the primary fails?

On most managed services, yes, but promotion is usually a manual or scripted step and any changes not yet replicated can be lost. Treat it as a recovery option, not your disaster plan.

Will a replica help with slow writes?

No. Writes still go to the primary. Slow writes usually come from locking, large transactions or heavy indexing.

Do we need a replica in another region?

Only if you have a specific latency or recovery requirement. Most early companies do not; see do you need multi-region yet.

What to do this week

Pull your top ten queries by total time and look at whether they are reporting, product or background work. If a few queries dominate, fix them first. If reporting dominates, a replica for reporting alone is a reasonable next step.

If you want a second pair of eyes on whether your database problem is queries, connections or genuine scale, a technical teardown includes it, and you can book a call to talk through what you are seeing.

F
The founder of Fraction
Built engineering teams from 2 to 30. Killed more bad rebuilds than I've greenlit. More about me →

Not sure the call you're about to make is the right one?

That's exactly what a 20-minute fit call is for — or a two-week Teardown if you'd rather start with a written verdict.