简体   繁体   中英

What is the different between replica and db instance in Aurora Postgresql?

I am reading docs about AWS aurora postgresql and I am little confused about db instance and replicas. I understand what replica means and it supports 15 replicas in Aurora master cluster. But does one replica map to one db instance? Can I create different numbers of db instance and replicas? If yes, where is each replica located?

But does one replica map to one db instance?

Yes. Your Aurora cluster will have one master db instance and up to 15 replicas. The replicas are db instances just for reading, while master is for writes and reads. Each of these 15 replicates, replicates only one master db instance. You can't make a replica which replicates master of a different cluster.

If yes, where is each replica located?

Not sure what do you mean by that. They are located in subnets which you specified using "subnet group" when you created your cluster.

One replica does map to one read-only DB instance. The primary (writer) instance and all the replicas in a cluster are all associated with the same storage devices. That's why the built-in Aurora replication is physical replication. All the replicas are reading from the same storage, they don't each have their own copy of the data.

In case of a hardware problem, a replica can be quickly turned into the new writer instance, because it already has visibility to the most up-to-date data in the cluster. Or you can quickly create a new replica (for example, with a more powerful instance class), because it doesn't need to reload its own copy of the gigabytes or terabytes of existing data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM