How does DocumentDB failover happen if the the reader instance and writer instance have different instance types?

403 Views Asked by At

I have a DocumentDB cluster with exactly one replica instance ( db.r5.16xlarge ) and a primary instance ( db.r5.24xlarge ). If something happens to the primary instance and a failover occurs, the replica instance will act as the new primary instance. Once the previous primary instance becomes ready, will it again failover back to my initial db.r5.24xlarge primary instance?

1

There are 1 best solutions below

0
On BEST ANSWER

No, it will not failover again to promote the previous primary instance. You'll have to failover manually to promote the bigger instance.

Better control can be achieved with 3 instance using failover tiers. Each replica instance is associated with a failover tier (0–15), where a lower tier means the instance has higher priority to be chosen for election.

For example, a cluster with two db.r5.24xlarge set on tier-1 and one db.r5.16xlarge set on tier-2. If a primary db.r5.24xlarge becomes unavailable, then the other db.r5.24xlarge will be promoted because it has a higher priority.

Reference.