GitHubの最近の可用性問題への対応
GitHubは過去数週間にわたり複数のサービスで発生した重大な可用性・パフォーマンス問題について、急激な利用増加とアーキテクチャの結合性が原因であると分析し、システムの回復力向上に向けた対策を説明している。
キーポイント
問題の原因分析
急激な利用増加、アーキテクチャの結合性による問題の連鎖、異常なクライアントからの負荷分散の不備が主要因として特定された。
2月9日のインシデント詳細
認証とユーザー管理を支えるコアデータベースクラスタの過負荷が原因で、人気クライアントアプリのAPI呼び出し増加とキャッシュ設定変更が複合的に影響した。
根本的な課題
利用増加の予測困難性、監視アラートの粒度不足、週末の低負荷時に問題が顕在化しなかったことが課題として挙げられている。
GitHubの対応姿勢
自社の可用性基準を満たせなかったことを認め、信頼性の重要性を理解し、システムの回復力向上に取り組む姿勢を示している。
複合要因によるデータベースクラスタの過負荷
通常のピーク負荷、クライアントアプリの更新、新モデルリリースが重なり、TTL延長による書き込み増加とクライアントからの読み込み増加がデータベースクラスタを圧倒した。
アーキテクチャの歴史的経緯と危険性の見落とし
ユーザー設定が認証・ユーザー管理用データベースクラスタに保存されていたのは初期の簡素さのためで、データ増加の危険性がTTLや限定された状況でしか顕在化しなかったため見逃された。
フェイルオーバー関連の2つのインシデント
2月2日はテレメトリギャップによる全地域影響のActions障害、3月5日はRedisフェイルオーバー後の書き込み不能状態という、フェイルオーバー機能の不十分さや設定問題が露呈した。
影響分析・編集コメントを表示
影響分析
この記事は、世界的な開発者プラットフォームであるGitHubの信頼性問題を公に説明することで、開発者コミュニティの信頼回復を図る重要なコミュニケーションである。同時に、急成長するプラットフォームが直面するスケーリングとアーキテクチャ設計の普遍的な課題を浮き彫りにしており、他のテック企業にとっても教訓となる内容を提供している。
編集コメント
大規模プラットフォームの成長痛を赤裸々に語る貴重なケーススタディ。技術的詳細と経営的説明責任のバランスが取れた、透明性の高いコミュニケーション事例として参考になる。
過去数週間にわたり、GitHubは複数のサービスに影響を与える重大な可用性およびパフォーマンスの問題を経験しました。最も影響の大きかった3件のインシデントは、2月2日、2月9日、3月5日に発生しました。
まず第一に、我々は責任を認識しています。自らの可用性基準を満たしておらず、信頼性が皆様の日々の業務の基盤であることを理解しています。これらの障害が皆様のチーム、ワークフロー、そして当社プラットフォームへの信頼に与えた影響を認識しています。
ここでは、これらのインシデントの原因と、システムの回復力を高めるために我々が取り組んでいることについて詳しく説明します。
何が起きたのか
これらのインシデントは、当社プラットフォーム全体で利用が急速に成長している期間に発生し、現在のアーキテクチャの一部におけるスケーリングの限界が露呈しました。具体的には、最近のプラットフォームの不安定性は、主に急速な負荷増加、局所的な問題が重要なサービスに連鎖することを可能にするアーキテクチャの結合、そしてシステムが異常なクライアントからの負荷を適切に軽減できないことによって引き起こされました。
今後の問題防止策について説明する前に、最も影響の大きかったインシデントの詳細について掘り下げる価値があります。
2月9日のインシデント
2月9日(月曜日)、認証とユーザー管理をサポートするコアデータベースクラスターが過負荷となったため、影響の大きいインシデントが発生しました。この問題につながったミスは、数日から数週間前に発生していました。
2月上旬、当社サーバーに対して大量のAPI呼び出しを行う2つの非常に人気のあるクライアントサイドアプリケーションがリリースされ、意図しない変更により、それらが生成する読み取りトラフィックが10倍以上増加しました。これらのアプリケーションはユーザーによって時間とともに更新されるため、利用の増加はすぐには明らかになりません。十分な数のユーザーがアップグレードするにつれて現れます。
2月7日(土曜日)、新しいモデルをデプロイしました。できるだけ早く顧客に提供しようとする中で、ユーザー設定を保存するキャッシュのリフレッシュTTLを12時間から2時間に変更しました。容量が限られていたため、モデルはより狭い範囲の顧客にリリースされ、この変更が必要となりました。この時点では、週末の負荷が大幅に低いため、すべて正常に動作しており、迫り来る問題を検出するのに十分に詳細なアラートがありませんでした。
その後、2月9日に3つの要因が重なりました:通常のピーク負荷、多くの顧客が週の始まりにクライアントアプリの新しいバージョンに更新したこと、そして別の新しいモデルリリースです。この時点で、TTLの短縮による書き込み量の増加と、クライアントアプリからの読み取り量が組み合わさり、データベースクラスターを圧倒しました。TTLの変更はすぐに原因の一つとして特定されましたが、読み取り負荷が増加し続ける理由を理解するにははるかに時間がかかり、インシデントが長期化しました。さらに、データベースクラスターが過負荷になった後、異なるサービス間の相互作用により、スタックのさらに上流で余分な負荷をブロックする必要がありましたが、そのレベルでブロックすべきトラフィックを特定するのに十分に詳細な制御機能がありませんでした。
2月9日のインシデントの調査は、ユーザー設定がなぜこの特定のデータベースクラスターに、この特定の方法で保存されていたのかについて、多くの重要な疑問を提起しました。このアーキテクチャは、モデルが非常に少なく、それらのモデルに関連するガバナンス制御とポリシーがほとんどなかった時代に、シンプルさを求めて選択されました。しかし時間の経過とともに、ユーザーごとに数バイトだったものがキロバイトに成長しました。負荷が新しいモデルやポリシーのロールアウト時のみに顕在化し、TTLによって隠されていたため、その危険性に気づきませんでした。このデータベースクラスターは認証とユーザー管理のデータを保持しているため、これらに依存するすべてのサービスが影響を受けました。
2月2日と3月5日のGitHub Actionsインシデント
また、当社のフェイルオーバーソリューションが不十分であるか、正しく機能しなかった2つの重要な事例がありました:
Actionsのホステッドランナーは2月2日に重大な障害を経験しました。この分野のクラウドインフラストラクチャの問題のほとんどは、限られたリージョンで発生するため通常は影響を及ぼさず、トラフィックを正常なリージョンに自動的に切り替えます。しかし、このケースでは、テレメトリのギャップによって引き起こされた一連の連鎖的なイベントがあり、既存のセキュリティポリシーがすべてのリージョンに影響を与える主要な内部ストレージアカウントに適用されました。これにより、VM作成時のVMメタデータへのアクセスがブロックされ、ホステッドランナーのライフサイクル操作が停止しました。
Actionsに対するもう一つの影響の大きいインシデントは3月5日に発生しました。自動フェイルオーバーは当社のRedisインフラストラクチャ全体に段階的に展開されており、この日、Actionsジョブオーケストレーションで使用されるRedisクラスターでフェイルオーバーが発生しました。フェイルオーバーは期待通りに実行されましたが、潜在的な設定の問題により、フェイルオーバー後のクラスターは書き込み可能なプライマリがない状態になりました。書き込みが失敗し、フェイルオーバーが緩和策として利用できないため、状態を手動で修正して対応する必要がありました。これは積極的な展開や回復力メカニズムの欠如ではなく、本番インフラストラクチャでのイベントによってのみ露呈した潜在的な設定の問題でした。
これらの両方のインシデントにおいて、調査は予期しない単一障害点を明らかにし、我々はそれらを保護し、本番環境でのフェイルオーバー手順をより厳密にドライランする必要があることを示しました。
これらのインシデント全体を通じて、以下のような要因が影響範囲を不必要に広げたり長引かせたりしました:
- アーキテクチャ内のクリティカルパスコンポーネント間の不十分な分離
- 負荷軽減とスロットリングのための不十分な安全策
- エンドツーエンドの検証、初期段階のシグナルへの注意を促すモニタリング、インシデント対応時の関係者間調整におけるギャップ
現在取り組んでいること
当社のエンジニアリングチームは、短期的な緩和策と、持続的な長期的なアーキテクチャおよびプロセスへの投資の両方に完全に取り組んでいます。我々は2つの共通テーマに対処しています:クリティカルパスの回復力と分離に焦点を当てて急速に増加する負荷を管理すること、そして局所的な障害が広範なサービス劣化を引き起こすことを防ぐことです。
短期的には、インシデントの可能性と影響を減らすための安定化作業を優先しています。これには以下が含まれます:
- モデルポリシーなどをホストするユーザーキャッシュシステムを再設計し、セグメント化されたデータベースクラスターで大幅に高いボリュームに対応すること。
- 緊急の成長に対処するために、重要なデータおよびコンピュートインフラストラクチャの基本的な健全性の完全な監査を完了し、キャパシティ計画を迅速化すること。
- 主要な依存関係をさらに分離し、GitHub ActionsやGitなどの重要なシステムが共有インフラストラクチャの問題による影響を受けないようにし、連鎖リスクを低減すること。これは、可能な場合は依存関係の障害を除去または処理するか、依存関係を分離する組み合わせによって行われています。
- スパイク時に下流コンポーネントを保護し、連鎖的な障害を防ぎながら、重要なトラフィック負荷を優先すること。
並行して、GitHubが高い可用性を持って持続的で高率の成長をサポートするというコミットメントを実現するため、より深いプラットフォームへの投資を加速しています。これらには以下が含まれます:
- 急速な成長に対応するため、インフラストラクチャをAzureに移行し、リージョン内での垂直スケーリングとリージョンをまたぐ水平スケーリングの両方を可能にすること。短期的には、これはインフラストラクチャの回復力に対するハイブリッドアプローチを提供します。本日現在、すべてのGitHubトラフィックの12.5%がAzure Central USリージョンから提供されており、7月までにすべてのGitHubトラフィックの50%を提供する予定です。長期的には、これによりマネージドサービスの採用を通じて、インフラストラクチャアーキテクチャの簡素化とよりグローバルな回復力が可能になります。
- 必要に応じてモノリスをより分離されたサービスとデータドメインに分割し、独立してスケールできるようにし、より分離された変更管理を可能にし、必要に応じてトラフィックを軽減するための局所的な決定を実装すること。
また、すべてのインシデントからの戦術的な修復作業も継続しています。
透明性へのコミットメント
何か問題が発生した際には、明確なコミュニケーションと透明性を提供することが重要であると認識しています。GitHubサービスのパフォーマンス低下をもたらすすべてのインシデントの概要を、ステータスページと月次の可用性レポートで公開しています。2月のレポートは本日後半に公開され、先月発生したインシデントの詳細な説明が含まれます。3月のレポートは4月に公開されます。
最近のインシデントの範囲を考慮し、本日コミュニティに対してこれらに対処することが重要であると考えました。GitHubが重要なデジタルインフラストラクチャであることを理解しており、皆様が必要とするときに、必要な場所で当社プラットフォームが利用可能であることを確保するために緊急の行動を取っています。GitHubプラットフォームの安定性と回復力を強化する間、ご辛抱いただきありがとうございます。
この投稿「Addressing GitHub’s recent availability issues」は、The GitHub Blogで最初に公開されました。
原文を表示
Over the past several weeks, GitHub has experienced significant availability and performance issues affecting multiple services. Three of the most significant incidents happened on February 2, February 9, and March 5.
First and foremost, we take responsibility. We have not met our own availability standards, and we know that reliability is foundational to the work you do every day. We understand the impact these outages have had on your teams, your workflows, and your confidence in our platform.
Here, we’ll unpack what’s been causing these incidents and what we’re doing to make our systems more resilient moving forward.
What happened
These incidents have occurred during a period of extremely rapid usage growth across our platform, exposing scaling limitations in parts of our current architecture. Specifically, we’ve found that recent platform instability was primarily driven by rapid load growth, architectural coupling that allowed localized issues to cascade across critical services, and inability of the system to adequately shed load from misbehaving clients.
Before we cover what we are doing to prevent these issues going forward, it is worth diving into the details of the most impactful incidents.
February 9 incident
On Monday, February 9, we experienced a high‑impact incident due to a core database cluster that supports authentication and user management becoming overloaded. The mistakes that led to the problem were made days and weeks earlier.
In early February, two very popular client-side applications that make a significant amount of API calls against our servers were released, with unintentional changes driving a more-than-tenfold increase in read traffic they generated. Because these applications end up being updated by the users over time, the increase in usage doesn’t become evident right away; it appears as enough users upgrade.
On Saturday, February 7, we deployed a new model. While trying to get it to customers as quickly as possible, we changed a refresh TTL on a cache storing user settings from 12 to 2 hours. The model was released to a narrower set of customers due to limited capacity, which made the change necessary. At this point, everything was operating normally because the weekend load is significantly lower, and we didn’t have sufficiently granular alarms to detect the looming issue.
Three things then compounded on February 9: our regular peak load, many customers updating to the new version of the client apps as they were starting their week, and another new model release. At this point, the write volume due to the increased TTL and the read volume from the client apps combined to overwhelm the database cluster. While the TTL change was quickly identified as a culprit, it took much longer to understand why the read load kept increasing, which prolonged the incident. Further, due to the interaction between different services after the database cluster became overwhelmed, we needed to block the extra load further up the stack, and we didn’t have sufficiently granular switches to identify which traffic we needed to block at that level.
The investigation for the February 9 incident raised a lot of important questions about why the user settings were stored in this particular database cluster and in this particular way. The architecture was originally selected for simplicity at a time when there were very few models and very few governance controls and policies related to those models. But over time, something that was a few bytes per user grew into kilobytes. We didn’t catch how dangerous that was because the load was visible only during new model or policy rollouts and was masked by the TTL. Since this database cluster houses data for authentication and user management, any services that depend on these were impacted.
GitHub Actions incidents on February 2 and March 5
We also had two significant instances where our failover solution was either insufficient or didn’t function correctly:
Actions hosted runners had a significant outage on February 2. Most cloud infrastructure issues in this area typically do not cause impact as they occur in a limited number of regions, and we automatically shift traffic to healthy regions. However, in this case, there was a cascading set of events triggered by a telemetry gap that caused existing security policies to be applied to key internal storage accounts affecting all regions. This blocked access to VM metadata on VM creates and halted hosted runner lifecycle operations.
Another impactful incident for Actions occurred on March 5. Automated failover has been progressively rolling out across our Redis infrastructure, and on this day, a failover occurred for a Redis cluster used by Actions job orchestration. The failover performed as expected, but a latent configuration issue meant the failover left the cluster in a state with no writable primary. With writes failing and failover not available as a mitigation, we had to correct the state manually to mitigate. This was not an aggressive rollout or missing resiliency mechanism, but rather latent configuration that was only exposed by an event in production infrastructure.
For both of these incidents, the investigations brought up unexpected single points of failure that we needed to protect and needed to dry run failover procedures in the production more rigorously.
Across these incidents, contributing factors expanded the scope of impact to be much broader or longer than necessary, including:
Insufficient isolation between critical path components in our architecture
Inadequate safeguards for load shedding and throttling
Gaps in end-to-end validation, monitoring for attention on earlier signals, and partner coordination during incident response
What we are doing now
Our engineering teams are fully engaged in both near-term mitigations and durable longer-term architecture and process investments. We are addressing two common themes: managing rapidly increasing load by focusing on resilience and isolation of critical paths and preventing localized failures from ever causing broad service degradation.
In the near term, we are prioritizing stabilization work to reduce the likelihood and impact of incidents. This includes:
Redesigning our user cache system, which hosts model policies and more, to accommodate significantly higher volume in a segmented database cluster.
Expediting capacity planning and completing a full audit of fundamental health for critical data and compute infrastructure to address urgent growth.
Further isolate key dependencies so that critical systems like GitHub Actions and Git will not be impacted by any shared infrastructure issues, reducing cascade risk. This is being done through a combination of removing or handling dependency failures where possible or isolating dependencies.
Protecting downstream components during spikes to prevent cascading failures while prioritizing critical traffic loads.
In parallel, we are accelerating deeper platform investments to deliver on GitHub’s commitment to supporting sustained, high-rate growth with high availability. These include:
Migrating our infrastructure to Azure to accommodate rapid growth, enabling both vertical scaling within regions and horizontal scaling across regions. In the short term, this provides a hybrid approach for infrastructure resiliency. As of today, 12.5% of all GitHub traffic is served from our Azure Central US region, and we are on track to serving 50% of all GitHub traffic by July. Longer term, this enables simplification of our infrastructure architecture and more global resiliency by adopting managed services.
Breaking apart the monolith into more isolated services and data domains as appropriate, so we can scale independently, enable more isolated change management, and implement localized decisions about shedding traffic when needed.
We are also continuing tactical repair work from every incident.
Our commitment to transparency
We recognize that it’s important to provide you with clear communication and transparency when something goes wrong. We publish summaries of all incidents that result in degraded performance of GitHub services on our status page and in our monthly availability reports. The February report will publish later today with a detailed explanation of incidents that occurred last month, and our March report will publish in April.
Given the scope of recent incidents, we felt it was important to address them with the community today. We know GitHub is critical digital infrastructure, and we are taking urgent action to ensure our platform is available when and where you need it. Thank you for your patience as we strengthen the stability and resilience of the GitHub platform.
The post Addressing GitHub’s recent availability issues appeared first on The GitHub Blog.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み