Failure and Disaster Prevention in Aurora PostgreSQL

1

Failure and Disaster Prevention in Aurora PostgreSQL We had assumed cross-region replication as a countermeasure method, but learned that it is not supported by Aurora PostgreSQL.

  1. How to implement cross-region replication even though it is not supported
  2. An alternative implementation that would satisfy almost the same requirements as cross-region replication.

Please tell us either or both of the above.

User
질문됨 2년 전350회 조회
2개 답변
2
수락된 답변

Dear Customer, Adding to the response already provided - there are some ways you can achieve this

Firstly please allow me to inform you that when it comes to replication with Aurora PostgreSQL we have the following options:

  • PostgreSQL logical replication using the pglogical extension
  • Physical replication with Aurora global database
  • PostgreSQL native logical replication

Same has been mentioned in details in below AWS blog. [+] https://aws.amazon.com/blogs/database/understand-replication-capabilities-in-amazon-aurora-postgresql/

Also please note that Aurora PostgreSQL DB clusters don't support Aurora Replicas in different AWS Regions, so we can't use Aurora Replicas for cross-Region replication.

PostgreSQL native logical replication:

Now you asked if for PostgreSQL native logical replication if we have any AWS managed service to set up the same then please allow me to inform you that unfortunately we don't have anything like that. If we want to enable native PostgreSQL logical replication then there are certain steps that we need to follow.

Below are the two links which talks about native PostgreSQL logical replication in detail.

[+] Using PostgreSQL logical replication with Aurora - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Replication.Logical.html

[+] https://aws.amazon.com/blogs/database/using-logical-replication-to-replicate-managed-amazon-rds-for-postgresql-and-amazon-aurora-to-self-managed-postgresql/

PostgreSQL logical replication using the pglogical extension:

If we talk about PostgreSQL logical replication using the pglogical extension then you can go through below AWS blog which talks about the same with step by step instructions.

[+] https://aws.amazon.com/blogs/database/part-2-upgrade-your-amazon-rds-for-postgresql-database-using-the-pglogical-extension/

Physical replication with Aurora global database:

We can't use Aurora Replicas for cross-Region replication but we have a concept of Aurora global database.

AWS Aurora global databases span multiple AWS Regions, enabling low latency global reads and providing fast recovery from the rare outage that might affect an entire AWS Region. An Aurora global database has a primary DB cluster in one Region, and up to five secondary DB clusters in different Regions.An Aurora global database consists of one primary AWS Region where your data is written, and up to five read-only secondary AWS Regions. You issue write operations directly to the primary DB cluster in the primary AWS Region. Aurora replicates data to the secondary AWS Regions using dedicated infrastructure, with latency typically under a second.

Please go through below AWS documentation which talks about "Using Amazon Aurora global databases" in detail.

[+] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html

AWS Database Migration Service (AWS DMS):

In the end you can also leverage AWS DMS service to set up replication between two Aurora PostgreSQL cluster both in different region.AWS Database Migration Service (AWS DMS) is a cloud service that makes it easy to migrate relational databases, data warehouses, NoSQL databases, and other types of data stores. You can use AWS DMS to migrate your data into the AWS Cloud or between combinations of cloud and on-premises setups.With AWS DMS, you can perform one-time migrations, and you can replicate ongoing changes to keep sources and targets in sync.

Below are the some documentation links for AWS DMS.

[+] What is AWS Database Migration Service? - https://docs.aws.amazon.com/dms/latest/userguide/Welcome.html [+] Using a PostgreSQL database as an AWS DMS source - https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html [+] Using a PostgreSQL database as a target for AWS Database Migration Service - https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.PostgreSQL.html

Limitations:

[+] Limitations on using PostgreSQL as a target for AWS Database Migration Service - https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.PostgreSQL.html#CHAP_Target.PostgreSQL.LimitaTIONS

AWS
전문가
답변함 2년 전
profile picture
전문가
검토됨 11일 전
profile picture
전문가
검토됨 4달 전
2

Hello User,

if I understood correctly, you want to achieve a cross-region resiliency for Aurora pg. While a "normal" Aurora pg cluster doesn't allow this (as you've already mentioned), Aurora Global Database should provide the level of disaster resiliency you're looking for.

Does this satisfy your requirements? Then I'd appreciate if you mark my answer as "accepted". Any questions left? Feel free to reach out via the comment section.

Kind regards, Uwe

profile pictureAWS
Uwe K
답변함 2년 전
profile picture
전문가
검토됨 11일 전
profile picture
전문가
검토됨 4달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인