rzlvmp
rzlvmp

Reputation: 9422

Is it possible to scale up/down Aurora RDS Cluster without downtime?

I have RDS Aurora PostgreSQL cluster with two instances:

cluster
├── instance_1 [writer] [no multiAZ]
└── instance_2 [reader] [no multiAZ]

When I changing instance type for instance_1 failover operation working correct but I have downtime about 1~2 minutes. I checked downtime by running

watch -n 3 "psql -h db.cluster.url -p 5432 -d postgres -U postgres -c 'select ID from TABLE limit 1'"

After that instance_1 becomes reader.

Is there any way to change instance_1 to reader manually, change it type and revert to writer without long downtime (no downtime is the best, but 5~10 seconds also acceptable)

I know that I may use multiAZ instances but it will be cost twice expensive.

Upvotes: 1

Views: 3682

Answers (1)

Stefan
Stefan

Reputation: 861

Using RDS Proxy can greatly reduce downtime during failover:

With RDS Proxy, failover times for Aurora and RDS databases are reduced by up to 66%

A big amount of the seemingly long failover is taken by

  1. the client library recovering from a connection loss and
  2. the DNS propagation of the reader/writer switch

RDS Proxy handles the reader/writer switch so that no DNS changes have to be propagated to the client, it uses always the same end point.

There is a good article which shows the speedup from 24 to 3 seconds average failover recovery time when using RDS proxy.

Upvotes: 2

Related Questions