1

I would like to setup a PostgreSQL database with read-only standby with automatic failover ability.

Does Amazon RDS with Multi-AZ have automatic failover ability?

If yes, will the endpoint/DNS automatically point to the new standby database?

Jatin Mehrotra
  • 9,286
  • 4
  • 28
  • 67
CJ Chang
  • 325
  • 4
  • 12
  • There's a video "Deep dive on Amazon RDS Multi-AZ with two readable standbys" that covers how this works for both the "one failover" and "two readable failover" options. https://www.youtube.com/watch?v=fLqJXTOhUg4 – Molomby Apr 27 '22 at 05:48

2 Answers2

2

There are 2 scenarios to this question as it was little ambiguous in the question.

scenario 1 :- rds with multi AZ.

  • Here standby instance will have automatic failover.
  • Here the endpoint/DNS automatically point to the new standby database, no manual intervention is needed.
  • But read and write is being taken by only the master DB and sync replication takes with standby database.

scenario 2 :- rds with multi AZ where read replicas is also there.

  • In this scenario read replicas are not treated like standby database database by default.howver they can be used like standby.

  • failover is not automatic.

  • You will need to manually update your dns.

article from aws says

A Read Replica in a different region than the source database can be used as a standby database and promoted to become the new production database in case of a regional disruption.

also a similar question on stack should also help you Difference between "Multi-AZ Deployment" and "Read Replica Verison Multi-AZ Deployment"

Jatin Mehrotra
  • 9,286
  • 4
  • 28
  • 67
0

Scenario 2 seems to have slightly evolved since 2021. Now this has become Multi-AZ DB Cluster

Reader DB instances act as automatic failover targets and also serve read traffic to increase application read throughput. If an outage occurs on your writer DB instance, RDS manages failover to one of the reader DB instances. RDS does this based on which reader DB instance has the most recent change record.

seb au
  • 1