Distributed Lockとは何か?
Distributed lockは、通常consensusストアや調整サービスに支えられて、別々のプロセスやホスト間で相互排他を提供します。あるプロセスがlockを取得し、クリティカルセクションを実行して解放する一方、他はそれを待ちます。堅牢な実装では、停止した保持者が状態を破損できないよう、leaseのtimeoutとfencing tokenを追加します。
なぜ重要か
マイグレーションを1回だけ実行する、あるいはインフラを適用するといった多くのworkflowは、runner間で同時に実行してはなりません。Distributed lockは、アクターが異なるマシン上に存在する場合でも単一の実行を強制します。
関連ガイド
What Is a Leader Election Protocol?A leader election protocol lets a group of replicas agree on a single active leader so that only one instance…
What Is State File Locking?State file locking prevents two infrastructure-as-code runs from modifying the same state at once, avoiding c…
What Is Idempotency Key Handling?Idempotency key handling uses a client-supplied unique token to ensure a retried request is processed at most…