AWSは人為ミスによる大規模障害をどう乗り越えたのか

QiitaでAWSの大規模障害を振り返る記事があった。その中でも天災ではなく人災を中心に、どういう改善策を練ったのかをピックアップしてみる。


Unfortunately, one of the inputs to the command was entered incorrectly and a larger set of servers was removed than intended. The servers that were inadvertently removed supported two other S3 subsystems. One of these subsystems, the index subsystem, manages the metadata and location information of all S3 objects in the region. This subsystem is necessary to serve all GET, LIST, PUT, and DELETE requests. The second subsystem, the placement subsystem, manages allocation of new storage and requires the index subsystem to be functioning properly to correctly operate.

まず2017年のS3の障害。入力ミスで想定より多くのサーバが削除されたとのこと。削除されたのはインデックスとプレースメントの2つのサブシステム。日本時間の深夜2:37に発生し早朝6:54に復旧が完了している。

We have modified this tool to remove capacity more slowly and added safeguards to prevent capacity from being removed when it will take any subsystem below its minimum required capacity level. This will prevent an incorrect input from triggering a similar event in the future.

で、対策が「ツールを改造して、一気に削除するのではなく、ゆっくり削除するようにする」というもの。なるほど、地味に効果ありそう。

This data is used and maintained by the ELB control plane to manage the configuration of the ELB load balancers in the region (for example tracking all the backend hosts to which traffic should be routed by each load balancer). The data was deleted by a maintenance process that was inadvertently run against the production ELB state data. This process was run by one of a very small number of developers who have access to this production environment. Unfortunately, the developer did not realize the mistake at the time.

次はロードバランサーを提供するELBで、これもメンテナンス中に誤って削除したというもの。どういう目的のメンテナンスで、どう間違ったのかは読み取れない。

This access was incorrectly set to be persistent rather than requiring a per access approval. We have reverted this incorrect configuration and all access to production ELB data will require a per-incident CM approval.

アクセスごとに承認するべきところが、永続的に承認されていたので、これを戻したという。これ、対策じゃなくて原因じゃないかなと若干もやもやする。

The traffic shift was executed incorrectly and rather than routing the traffic to the other router on the primary network, the traffic was routed onto the lower capacity redundant EBS network. For a portion of the EBS cluster in the affected Availability Zone, this meant that they did not have a functioning primary or secondary network because traffic was purposely shifted away from the primary network and the secondary network couldn’t handle the traffic level it was receiving.

最後のケースはルーティングを書き換えるときに他のプライマリにルーティングするつもりが、自分自身の冗長ルートにルーティングしてしまいEBSを孤立させてしまったというもの。ただ孤立しただけでなく、ミラーリングする相手がいなくなったので、再ミラーリングが始まりリソースが枯渇した。

The first is that we will immediately improve our timeout logic to prevent thread exhaustion when a single Availability Zone cluster is taking too long to process requests. This would have prevented the API impact from 12:50 AM PDT to 2:40 AM PDT on April 21st. To address the cause of the second API impact, we will also add the ability for our EBS control plane to be more Availability Zone aware and shed load intelligently when it is over capacity.

対策として、①単一のAZからの応答に時間がかかる場合のタイムアウトを見直すこと、②容量を超えたときにインテリジェントに負荷を軽減させるということを上げている。

あちこちで自動化を進めているから、どこで暴走するか予想しにくくもなっているのだろう。一方で、ひとつめの「削除はゆっくり」みたいなプラクティスなんかも蓄積されているのかもしれない。


この記事が気に入ったらサポートをしてみませんか?