1

As I understand it, I can use a Multi-AZ RDS deployment for HA and add Read Replicas to improve my read capacity and performance. In able to leverage Read Replicas I will need to maintain a separate connection pool with-in my Application strictly for read operations. However, from what I've read it appears that Read Replication is broken when a Multi-AZ RDS fails over to the standby instance. If this is true:

  1. How do manage the Read Connection Pool in my Application? ie) will the dns addresses of the read replicas change and therefor require application code changes to update the Connection Pool?
  2. Should I have read replicas already created for the standby instance or can I re-associate the existing read replicas with the standby?
  3. Will the Read Replicas continue to function during failure and effectively serve my Application stale data until I update the connection pool?
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
stowns
  • 321
  • 1
  • 10
  • 1
    Which database engine are you using exactly? The answer will be different if you are using Aurora, or one of the other RDBMS engines on RDS. – Mark B May 06 '19 at 15:43
  • This would be for Postgres/MySQL. But I would be interested in knowing how Aurora handles Failover with Read Replicas if it behaves differently. – stowns May 06 '19 at 15:50
  • 1
    Aurora gives you separate DNS endpoints you can hit for master and read-replicas. The single Aurora read-replica endpoint will load balancer queries across replicas. Both the Aurora write and read endpoints automatically handle failovers with no work needed in your application except handling connection retries. For Postgres/MySQL you would need to update your DB connection settings and restart your application. – Mark B May 06 '19 at 15:56
  • *"from what I've read it appears that Read Replication is broken when a Multi-AZ RDS fails over to the standby instance"* Where did you read this? In (non-Aurora) RDS for MySQL this should not be true at all, and probably not for Postgres, either. – Michael - sqlbot May 06 '19 at 20:14
  • @Michael-sqlbot it was mentioned as a part of the AWS Associate Architect training on acloud.guru. The way I understood it, there were 2 scenarios where Read Replication was broken 1. promote a read replica. it becomes its own DB instance and nothing will be replicating from it (makes sense) 2. the origin db fails-over. i *think* this breaks replication because the replicas are replicating from a specific instance in a specific AZ. However, i'm not 100% positive of this and have no docs/testing to back it. – stowns May 07 '19 at 17:20

0 Answers0