全体像
S3 の高可用性・災害復旧に関連する機能の関係
┌─────────────────────────────────────────────────────────────────────────┐
│ S3 の高可用性・災害復旧 │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ 【データの複製】 【アクセスの制御】 │
│ │
│ ┌─────────────────────┐ ┌─────────────────────┐ │
│ │ S3 レプリケーション │ │ Multi-Region │ │
│ │ (CRR/SRR) │ ←─連携─→ │ Access Point │ │
│ │ │ │ │ │
│ │ ・レプリケーションルール│ │ ・フェイルオーバー制御 │ │
│ │ ・S3 RTC │ │ ・Active/Passive │ │
│ └─────────────────────┘ └─────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘
S3 RTC(Replication Time Control)
レプリケーションの完了時間を保証する機能
出典: Object Storage Features – Amazon S3
“S3 Replication Time Control helps meet compliance requirements by replicating most objects within seconds and 99.99% within 15 minutes, backed by a Service Level Agreement (SLA).”
なぜ必要か
通常のレプリケーションは「いつ完了するかわからない」。コンプライアンス要件で「データは15分以内に別リージョンにコピーされていること」といった要件がある場合、RTC が必要になる
SLA
99.99% のオブジェクトが 15 分以内にレプリケートされることが保証される
出典: Service Level Agreement – Amazon S3 Replication Time Control
“The Feature Commitment is a promise to make the RTC Feature meet a specific percentage of successful replications within 15 minutes in each region pair per account during a monthly billing cycle.”
SLA を満たせなかった場合はサービスクレジットが発行される
Multi-Region Access Point(MRAP)
複数リージョンの S3 バケットに単一のエンドポイントでアクセスする機能
出典: Managing multi-Region traffic with Multi-Region Access Points
“Amazon S3 Multi-Region Access Points provides a global endpoint that applications can use to fulfill requests from S3 buckets that are located in multiple AWS Regions.”
なぜ必要か
- アプリケーションは MRAP のグローバルエンドポイントにリクエストを送るだけで、自動的に最寄りのリージョンにルーティングされる
- リージョン障害時にアプリケーション側のコード変更なしでフェイルオーバーできる
仕組み
出典: Managing multi-Region traffic with Multi-Region Access Points
“Application requests made to a Multi-Region Access Point global endpoint uses AWS Global Accelerator to automatically route over the AWS global network to the closest proximity S3 bucket with an active routing status.”
AWS Global Accelerator を使って、最も近いアクティブなバケットにルーティングする
データの流れ
┌─────────────────┐ ┌─────────────────┐
│ ソースバケット │ ──レプリケーション──→ │ 送信先バケット │
│ (us-east-1) │ (CRR/SRR) │ (eu-west-1) │
│ │ │ │
│ │ S3 RTC で │ │
│ │ 15分以内保証 │ │
└─────────────────┘ └─────────────────┘
▲ ▲
│ │
└──────────┬──────────────────────────┘
│
│ ルーティング
│
┌──────────┴──────────┐
│ Multi-Region │
│ Access Point │
│ │
│ Active/Passive 制御 │
│ フェイルオーバー │
└──────────┬──────────┘
│
│ グローバルエンドポイント
▼
┌─────────────────────┐
│ アプリケーション │
└─────────────────────┘
Active-Active と Active-Passive の違い
MRAP のルーティング設定には2つの構成がある
出典: Amazon S3 Multi-Region Access Points routing states
“Active-active – In an active-active configuration, all requests are automatically sent to the closest proximity AWS Region in your Multi-Region Access Point.” “Active-passive – In an active-passive configuration, the active Regions in your Multi-Region Access Point receive traffic and the passive ones do not.”
Active-Active
全リージョンがトラフィックを受信する構成
ユーザー(東京)──→ MRAP ──→ 東京バケット(最寄り)
ユーザー(欧州)──→ MRAP ──→ 欧州バケット(最寄り)
- 全リージョンが Active 状態
- リクエストは自動的に最寄りのリージョンにルーティングされる
- 障害発生時は自動的に他の Active リージョンにリダイレクトされる
出典: Amazon S3 Multi-Region Access Points routing states
“If traffic disruption occurs in an active-active configuration, network traffic will automatically be redirected to one of the active Regions.”
Active-Passive
一部のリージョンのみがトラフィックを受信する構成
通常時:
ユーザー ──→ MRAP ──→ 東京バケット(Active)
欧州バケット(Passive、待機中)
フェイルオーバー後:
ユーザー ──→ MRAP ──→ 東京バケット(Passive)
欧州バケット(Active)
- Active リージョンのみがトラフィックを受信
- Passive リージョンは待機状態でトラフィックを受け付けない
- 手動でフェイルオーバーを実行して切り替える
使い分け
| 構成 | 動作 | ユースケース |
|---|---|---|
| Active-Active | 全リージョンがトラフィック受信。最寄りにルーティング。障害時は自動リダイレクト | 低遅延アクセスが必要な通常運用 |
| Active-Passive | Active のみトラフィック受信。Passive は待機。手動でフェイルオーバー | DR テスト、計画的フェイルオーバー、明示的な制御が必要な場合 |
出典: Amazon S3 Multi-Region Access Points routing states
“If you intend to use S3 failover controls to initiate failover in a disaster situation, set up your Multi-Region Access Points in an active-passive configuration while you’re testing and performing disaster-recovery planning.”
DR 計画やテストを行う場合は Active-Passive 構成が推奨される。これは、フェイルオーバーの動作を明示的に制御・検証できるため
CRR との組み合わせ
出典: Amazon S3 Multi-Region Access Points failover controls
“If you have CRR enabled in an active-active configuration, Amazon S3 Multi-Region Access Points can also fetch data from the bucket location of closest proximity, which improves application performance.”
Active-Active + CRR の組み合わせで、最寄りのバケットからデータを取得できるためパフォーマンスが向上する
フェイルオーバー
リージョン障害時にトラフィックを別リージョンに切り替える操作
出典: Managing multi-Region traffic with Multi-Region Access Points
“If a Regional traffic disruption occurs, you can use Multi-Region Access Points failover controls to shift the S3 data request traffic between AWS Regions and redirect S3 traffic away from the disruptions within minutes.”
出典: Using Amazon S3 Multi-Region Access Point failover controls
“When users initiate failover, Amazon S3 request traffic automatically gets shifted to an alternate AWS Region, and the failover process is completed within 2 minutes.”
フェイルオーバーは 2 分以内に完了する
SubmitMultiRegionAccessPointRoutes API
MRAP のルーティング状態を更新する API
出典: Using Amazon S3 Multi-Region Access Point failover controls
“The ‘Edit routing status’ control enables users to manually edit the routing statuses of up to 17 AWS Regions for their MRAP.”
この API を使って、各リージョンの Active/Passive 状態を変更する。コンソールでは「Edit routing status」として表示される
ユースケース別の使い分け
| ユースケース | 使う機能 |
|---|---|
| 災害復旧(DR) | CRR + MRAP(Active-Passive) |
| 低遅延グローバルアクセス | CRR + MRAP(Active-Active) |
| コンプライアンス(15分以内複製保証) | CRR + S3 RTC |
| 同一リージョンでのバックアップ | SRR |
| 既存オブジェクトの複製 | Batch Replication |