LoginSignup
1
0

More than 1 year has passed since last update.

RDS/Aurora の failover をまとめる

Last updated at Posted at 2023-03-31

RDS

📝 Primary, Read replica A, read replica B のそれぞれが異なるhost名を持つ。

Multi AZ 構成の場合、

  • RTO = ~35 sec (by promoting standby to master)
  • RPO = 1sec (sync copy)
  • automatic failover (No manual operations)
  • No hostname change

非 Multi AZ 構成の場合、

  • RTO = a few minutes (Promote read replica to master. Rebooting is required.)
  • RPO = 1−2 min (async copy)
  • Manual failover in AWS console. (Promote read replica to master.)
  • Hostname changes (Use read replica’s hostname as the primary.)

ref.

グローバル構成について

cross region reader replication を有効化する。primary region が落ちた場合は、非 Multi AZ 構成の場合と同じ。

Aurora

📝 Writer, Read replica A, read replica B のそれぞれが異なるhost名を持つ。

Multi AZ 構成の場合、

  • RTO = 1-2 min
  • RPO = 1 sec (async replication)
  • automatic failover (No manual operations)
  • No hostname change

非 Multi AZ 構成の場合、

  • RTO = 1-2 min (if there is a read replica), 10 min (if there is not a read replica)
  • RPO = 1-2 min (async copy) ????
  • automatic failover (No manual operations) ????
  • No hostname change

📝 read replicaをmasterにpromoteする場合、rebootは必要なさそう。

ref

If the primary instance in a DB cluster fails, Aurora automatically fails over in the following order:

If Aurora Read Replicas are available, promote an existing Read Replica to the new primary instance.
If no Read Replicas are available, then create a new primary instance.
https://aws.amazon.com/blogs/database/failover-with-amazon-aurora-postgresql/

グローバル構成について

global tableにすることで、各regionにclusterが置かれる。

ある region が落ちた場合、

  • RTO
    • managed planned failover なら、1-2min (region Bにおいてread replicaをwriterへpromoteする) これは、region がavailableな時のみ使用可能なので、disaster recovery時には使えない。
    • manual unplanned failover なら、もっとかかる (自分で detach and promote a secondary DB cluster)
  • RPO = 1-2min (async replicationなので)
    • managed RPO で上限(20s以上)を設定できる。(= replicaへのコピーがこれ以上遅れている場合、primaryの処理を待機させる)
  • failover はコンソール上で手動
    • managed planned failoverなら、コンソール上でregionを選択するだけ。 これは、region がavailableな時のみ使用可能なので、disaster recovery時には使えない。
    • manual unplanned failover なら、もっと大変 (自分で detach and promote a secondary DB cluster)
  • Hostname changes (because endpoint inludes region in it like database-2.cluster-cgb61uwsvky2.ap-northeast-1.rds.amazonaws.com)

ref.

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0