Saga オーケストレーションとは?
saga オーケストレーションは、複数のサービスにまたがるビジネストランザクションを、それぞれが補償アクションを持つ一連のローカルトランザクションに分割して管理します。中央のオーケストレーターが各ステップをトリガーし、一つが失敗すれば補償を実行して完了済みのステップをロールバックします。これにより、分散 two-phase commit なしにサービス間の整合性を提供します。
なぜ重要か
各マイクロサービスは自身のデータを所有するため、それらをまたぐ単一の ACID トランザクションは通常不可能です。saga は補償を通じて結果整合性を達成し、後で解消される中間状態を受け入れます。
関連ガイド
What Is the Outbox Pattern?The outbox pattern writes events to a database table in the same transaction as the data change, then publish…
What Is Idempotency Key Handling?Idempotency key handling uses a client-supplied unique token to ensure a retried request is processed at most…
What Is a Change Data Capture Stream?A change data capture stream emits a continuous feed of row-level inserts, updates, and deletes from a databa…