リソース · 18

API統合を障害に対して耐性のあるものにする

依存関係をマッピングし、再試行回数を制限し、外部障害発生時にも重要な処理が利用可能であることを維持する。

更新済み · 20 min

架空の無人通信室。外された光ケーブル、黒いネットワークラック、えんじ色の資料ケース、真ちゅうのランプ AIで生成した編集用イラスト

このガイドが達成するのに役立つこと

  • APIとビジネスジャーニーの接続
  • バインドされた呼び出しと再試行
  • パフォーマンス低下時の計画
  • 復旧状況の測定

クイックチェック

  • どのジャーニーが各プロバイダに依存しているか?
  • すべての呼び出しにタイムアウトが設定されているか?
  • 再試行によって操作が重複する可能性はあるか?
  • 障害発生時にユーザーには何が表示されるか?
  • 通常サービスへの復帰を承認するのは誰か?

手順

  1. 1

    呼び出しのマッピング

    すべての統合を、交換データ、契約、所有者、ジャーニーステップに接続します。 ユーザーをブロックする同期呼び出しを特定します。

    成果物:優先順位付けされた依存関係マップ

  2. 2

    時間予算の設定

    各呼び出しのタイムアウトとジャーニーごとの合計予算を定義します。 サービスチェーンによる待ち時間の重複を防ぎます。

    成果物:タイムアウトとしきい値のマトリックス

  3. 3

    再試行回数の制限

    繰り返しても安全な操作のみを再試行する。 冪等性をテストし、試行回数を制限し、適切なバックオフで分散させる。

    成果物:テスト済みの再試行ポリシー。

  4. 4

    パフォーマンス低下時の計画

    障害発生時に使用可能なデータ、キューに格納できるデータ、および表示される明確なメッセージを決定する。

    成果物:各ジャーニーごとのフォールバック動作。

  5. 5

    インシデントをシミュレートする

    制御された環境で遅延、無効な応答、および障害を発生させる。 負荷、データ、インターフェース、および復旧状況を確認する。

    成果物:障害テスト結果。

  6. 6

    結果を監視する

    実際に失われたエラー、遅延、キュー、およびビジネスアクションを追跡する。 エスカレーション担当者とサプライヤーとの調整担当者を割り当てる。

    成果物:ダッシュボードと復旧手順。

管理指標

指標測定対象最初のアクション
マッピングされたジャーニー既知の依存関係を持つ必須ジャーニー不明な呼び出しへの担当者の割り当て
時間予算ジャーニー期限内の呼び出し連鎖待機のレビュー
安全な再試行副作用のない繰り返し操作冪等性の追加または再試行の削除
テスト済みの劣化ユーザー結果が観測された障害シナリオ継続性と通信の改善

よくある間違い

  • 過負荷状態のサービスに対する無制限の再試行
  • 冪等性のない書き込みの繰り返し
  • ラベル付けされていない古いデータによる障害の隠蔽
  • プロバイダ応答率のみの測定

よくある質問

すべてのリクエストを再試行すべきか?

いいえ。再試行は、特定の一時的な障害に対応するのに役立ちますが、全体の期限、冪等性、およびプロバイダ負荷を遵守する必要があります。

サーキットブレーカーで十分でしょうか?

サーキットブレーカーは一部の呼び出しを保護しますが、ユーザーエクスペリエンスやキューイングされた作業の回復を保証するものではありません。

最初に測定すべき事項は何か?

重要な業務への影響:所要時間、アクションの損失または遅延、および復旧品質。

参照資料:データ・用途・限界

資料確認日 .

この言語版の詳しい参照メモは英語で提供しています。

参照資料:データ・用途・限界
出典と目的確認済みのデータ・指標利用方法留意する限界
OASIS · TAXII 2.1

Exchange threat intelligence through an application protocol.

TAXII 2.1 is an OASIS Standard dated 10 June 2021. It includes service discovery and access to collections. Test authentication, collection permissions, pagination and recovery after interruption. Record which objects were actually received and processed.

手法を詳しく読む →

TAXII transports data; it replaces neither the content model nor assessment of reliability.

ETag・HTTPキャッシュ・同時更新

この言語版の詳しい参照メモは英語で提供しています。

A retry must not overwrite a newer version

Separate a network failure, a failed precondition and the retry decision. A 412 is not an invitation to resend the same write repeatedly.

  • Keep the ETag with the representation used to prepare PUT.
  • After 412, read again and resolve the conflict; backoff alone does not reconcile edits.
  • Document duplicates and requests with unknown outcomes separately: they are outside this precondition simulator.

Explore ETag comparisons and the simulator →

References reviewed · RFC 9110 · §13 · RFC 9111 · RFC 6585 · §3

冪等性とAPI再試行の契約

この言語版の詳しい参照メモは英語で提供しています。

Compare an HTTP property with a provider contract

HTTP idempotence concerns the intended effect of identical requests. Application retry keys belong to the API’s contract. Stripe details below are attributed to its documentation accessed on 22 October 2026, apply to its APIs and are not simulated by the budget model.

Lost response: three checks before another write
Lost response: three checks before another write After a lost response, connect the operation to verified business state. Then check operation identity, retry contract and context. Finally choose reconciliation or a bounded retry; arbitrarily changing the key does not prove absence of an earlier effect. Unknown result Reconcile business state Contract and identity Same operation checked context Bounded decision Retry or verification

After a lost response, connect the operation to verified business state. Then check operation identity, retry contract and context. Finally choose reconciliation or a bounded retry; arbitrarily changing the key does not prove absence of an earlier effect.

Six Stripe differences or limits to document

Six Stripe differences or limits to document
ComparisonAPI v1API v2
Methods accepting keysPOST accepts keys. Sending one on GET or DELETE has no effect under this contract.POST and DELETE accept keys; GET is idempotent by definition and a key has no effect.
Reused resultAfter execution begins, the initial status and body are saved; a retry can return the same 500 error.Successful work is not repeated. Failed or partially failed work can be retried for an updated response; an impossible replay returns an explanatory error.
Window and retentionThe dedicated page permits pruning after at least 24 hours. A key reused after pruning creates a new request.Documented replay is within 30 days for the same API and account or sandbox.
Parameters and scopeThe layer compares parameters with the original request and rejects incompatible reuse.Same API and same account or sandbox are part of replay conditions; review the exact endpoint contract.
Before executionA validation failure or concurrency conflict that does not initiate the endpoint saves no idempotent result, according to the v1 page.Do not copy a v1 exception without checking v2 documentation and the endpoint being used.
Durable identityA key should remain tied to one intention and its parameters; documentation advises against sensitive data in keys.Automatic service-side key generation does not remove the client’s need to associate retries with the correct operation.

Status is not everything: Stripe-Should-Retry

Status is not everything: Stripe-Should-Retry
Documented valueStripe guidanceLimit
trueRetry using exponential backoff under the error-handling documentation.Also check operation identity, context, budget and contract.
falseDo not retry the request.Do not replace this signal with a generic “every 5xx can be replayed” test.
AbsentDecide using status and other response information.Absence neither guarantees no effect nor requires a retry.

Four retry situations needing different evidence

Response lost after sending

A client does not receive a creation response.

Find the operation and state in the authorised source; retain the key if the contract permits replay of that same intention.

A new key can describe a new operation and produce another effect.

Same key, changed parameters

The client changes content while reusing a key.

Compare parameters with the contract and separate correcting a request from repeating it identically.

The described v1 contract rejects incompatible parameters; do not work around this with a new key without a business decision.

Key outside its replay window

The application wants to replay an old request.

Review duration, API, account and business state; do not assume the provider retains the first result forever.

An old key is not evidence of permanent uniqueness.

Two workers for one effect

Two workers both read “effect absent”.

Test atomic claiming of the local effect and the external-effect contract; retain both receipts.

A preliminary SELECT or local constraint alone cannot guarantee uniqueness at a remote provider.

Keep three identities separate

Keep three identities separate
IdentityRole in a webhook exampleLimit
Request keyRecognise a repeated client request under an API contract.It is not automatically the identifier of a received event.
Event identifierConnect repeat deliveries from a provider and its context.Different events can concern the same business effect.
Business-effect keyPrevent a repeated chosen local business action using an appropriate atomic mechanism.A remote effect needs its own guarantee, controlled recovery and reconciliation.

Explore Retry-After and the retry model →

Primary sources and limits

The RFCs define the cited HTTP elements. AWS describes design choices and Stripe documents its own APIs. Budgets, local waits, cases and diagrams are educational: they neither measure your service nor execute requests.

References reviewed

OAuth/OIDC:対象と権限

この言語版の詳しい参照メモは英語で提供しています。

Token renewal does not replace access-removal procedures

Separate session, access-token and refresh-token lifecycles in operations. Local sign-out does not prove they all become invalid simultaneously.

  • Measure residual access using authorised test accounts and objects.
  • Exercise expiry, revocation and provider outage without logging secrets.
  • Record expected responses and the owner responsible for restoring the integration.

See token recipients and the ten OAuth/OIDC cases →

Sources reviewed on · IETF · RFC 9700 · OAuth 2.0 Security BCP · IETF · RFC 9068 · JWT access token profile · OpenID Foundation · OpenID Connect Core 1.0 · IETF · RFC 8725 · JWT Best Current Practices · IETF · RFC 6749 · OAuth 2.0 framework

Webhook:署名と再送

この言語版の詳しい参照メモは英語で提供しています。

API recovery and webhook recovery follow different contracts

For incoming notifications, track the event, transport attempt and business effect separately. A signature authenticates a message; it is not an idempotency key.

  • Retain required raw bytes and authenticate each new attempt.
  • Plan provider-specific recovery: Stripe can retry automatically; GitHub does not automatically redeliver failures.
  • Test lost responses, concurrency and post-outage reconciliation.

See webhook signatures, digests and the ten cases →

Sources reviewed on · Stripe · Webhooks · Stripe · Manage webhook endpoints · GitHub · Validating webhook deliveries · GitHub · Best practices for using webhooks · GitHub · Handling failed webhook deliveries

SSRF:URLと接続

この言語版の詳しい参照メモは英語で提供しています。

A retry does not change destination policy

Resilience for a URL importer must preserve egress controls. A fallback address, proxy or redirect introduces another step to verify, even when the original string passed the application contract.

  • Use the same parser and fields for validation and the HTTP client.
  • Bind validated addresses to actual connections while preserving TLS and the original hostname.
  • Test refusals and limits in an authorized lab without probing third-party services.

Read the 12 cases and connection controls →

Sources reviewed on · OWASP · SSRF Prevention Cheat Sheet · WHATWG · URL Living Standard · AWS EC2 · Instance metadata options · IETF · RFC 3849

ページ分割:整合性と再開

この言語版の詳しい参照メモは英語で提供しています。

Recovery follows the batch actually retained

A retry needs to know which objects were retained and under which view. Advancing continuation before confirming a batch can lose data; rereading requires deduplication and an external-effects policy.

  • Test a crash between batch retention and checkpointing.
  • Do not infer completion from page size alone.
  • Recheck permissions and reference validity on every recovery.

Compare computed reads and recoveries →

Sources reviewed on · Google · AIP-158 Pagination · PostgreSQL 18 · LIMIT and OFFSET · PostgreSQL 18 · Row constructor comparison · PostgreSQL 18 · Transaction isolation · OWASP · API1:2023 Broken Object Level Authorization

APIエラー:型・状態・証拠

この言語版の詳しい参照メモは英語で提供しています。

Handle an error without parsing its sentence

An API client may receive a translated title, missing member or unfamiliar extension. Preserve decisions based on the documented type and HTTP status, then connect a safe action to the context.

  • Compare received status and JSON status without silently replacing either.
  • Test absent type, string status instead of a number, and an unknown extension.
  • Separate person-facing text, business code and occurrence reference.

Explore problem types and eight fictional responses →

IETF · M. Nottingham, E. Wilde, S. Dalal · RFC 9457 · July 2023 · obsoletes RFC 7807 · §3.1, §3.2, §4.2, §5

APIの非推奨化と廃止

この言語版の詳しい参照メモは英語で提供しています。

An integration can remain available after being deprecated. Planning migration therefore requires separating the announced lifecycle, actual service state and dependencies still to move. This dossier adds relevant HTTP signals, deadline interpretation and exit checks for API, operations and security teams.

References: RFC 9745 (March 2025) for Deprecation and RFC 8594 (May 2019, Informational) for Sunset. When both dates are provided, Sunset must not precede Deprecation. Equal dates satisfy that ordering; they do not establish that sufficient notice was provided.

IETF · RFC 9745 · Deprecation · Standards Track · March 2025 · §2–5 · consulted 2026-10-23

IETF · RFC 8594 · Sunset · Informational · May 2019 · §3–5, §8 · consulted 2026-10-23

Four signals for planning migration

Four signals for planning migration
SignalWhat it communicatesFormat or natureLimitation to retain
DeprecationAnnounces past or future deprecation of the contextual resource.Structured Fields Date, not a textual HTTP-date.Does not by itself change resource behaviour.
SunsetIndicates when the resource is likely to stop responding.HTTP-date; emitted IMF-fixdate uses GMT.A retirement hint, not an availability guarantee before or after.
Link · rel="deprecation"Points to deprecation documentation.A link relation, not a date.Documentation may be exposed before a dated announcement.
Link · rel="sunset"Points to retirement information or policy.A link relation, not a deadline.Read the scope and conditions actually documented.

Two date formats that must not be interchanged

Two date formats that must not be interchanged
Educational exampleReadingReference
Deprecation: @168816959930 June 2023 at 23:59:59 UTC. The number represents seconds since the Unix epoch, prefixed with @.RFC 9745 §2.1; RFC 9651 §3.3.7
Sunset: Sun, 30 Jun 2024 23:59:59 GMTCIE example in IMF-fixdate: English weekday, date and GMT. Do not substitute an ISO timestamp here.RFC 8594 §3; RFC 9110 §5.6.7

IETF · RFC 9651 · Structured Fields · Standards Track · September 2024 · §3.3.7 · consulted 2026-10-23

IETF · RFC 9110 · HTTP semantics · Internet Standard · June 2022 · §5.6.7 · consulted 2026-10-23

UTC時系列を読む

Compare timestamps already normalised to UTC. The reader does not decode HTTP headers: it works on dates you have extracted and checked. Both deadlines are optional; the reading timestamp is required. Examples use a fixed reference time so results remain reproducible.

CIE input profile: YYYY-MM-DDTHH:mm:ssZ, years 1970 to 2099, seconds 00 to 59, without fractions, spaces or numeric offsets. These limits keep the workshop predictable; they do not describe the full RFC syntax. A blank date means “not supplied in this exercise”, not “this policy does not exist”.

Local calculation without network requests, import, storage or export. The reader establishes neither availability, compatibility nor complete header conformance. It derives no minimum migration notice: check the contract, policy, dependencies and provider contact. Reaching a Sunset date remains an announced hint, not proof of actual shutdown.

Deadline offsets from the reading time are signed: negative means past, zero means reached, positive means future. Sunset − Deprecation compares the announcements; a negative interval signals inconsistent ordering. Values are exact seconds within the profile, not local calendar days.

Nine reading scenarios, available without JavaScript

V01 · Future deprecation
Future deprecation
Normalised DeprecationNormalised SunsetUTC reading timestampExpected reading
2026-11-01T00:00:00Z2026-12-01T00:00:00Z2026-10-23T00:00:00ZTwo future deadlines separated by 2,592,000 seconds. This timeline does not establish contractually sufficient notice.
V02 · Deprecation already effective
Deprecation already effective
Normalised DeprecationNormalised SunsetUTC reading timestampExpected reading
2026-10-01T00:00:00Z2026-12-01T00:00:00Z2026-10-23T00:00:00ZDeprecation is past and Sunset is future. This does not mean the resource has already stopped working.
V03 · Sunset date reached
Sunset date reached
Normalised DeprecationNormalised SunsetUTC reading timestampExpected reading
2026-10-01T00:00:00Z2026-10-23T00:00:00Z2026-10-23T00:00:00ZSunset minus reading time is zero. Check actual service state and migration; the field remains a hint.
V04 · Conflicting order
Conflicting order
Normalised DeprecationNormalised SunsetUTC reading timestampExpected reading
2026-11-01T00:00:00Z2026-10-01T00:00:00Z2026-10-23T00:00:00ZSunset precedes Deprecation by 2,678,400 seconds. Seek clarification rather than assuming a coherent schedule.
V05 · Sunset only
Sunset only
Normalised DeprecationNormalised SunsetUTC reading timestampExpected reading
—2026-12-01T00:00:00Z2026-10-23T00:00:00ZA retirement date is supplied, but no Deprecation date is provided in the exercise. Do not invent the missing date.
V06 · Deprecation only
Deprecation only
Normalised DeprecationNormalised SunsetUTC reading timestampExpected reading
2026-10-01T00:00:00Z—2026-10-23T00:00:00ZDeprecation is effective at the chosen time; no retirement date is supplied. Do not infer a support period.
V07 · No deadlines supplied
No deadlines supplied
Normalised DeprecationNormalised SunsetUTC reading timestampExpected reading
——2026-10-23T00:00:00ZThe absence of dates in this input guarantees neither longevity nor the absence of an external policy.
V08 · Impossible calendar date
Impossible calendar date
Normalised DeprecationNormalised SunsetUTC reading timestampExpected reading
2026-02-29T00:00:00Z2026-12-01T00:00:00Z2026-10-23T00:00:00Z2026 is not a leap year. Input is rejected instead of silently normalising into March.
V09 · Both dates equal the reading time
Both dates equal the reading time
Normalised DeprecationNormalised SunsetUTC reading timestampExpected reading
2026-10-23T00:00:00Z2026-10-23T00:00:00Z2026-10-23T00:00:00ZOrdering satisfies the non-earlier relation with a zero interval. This does not establish that a migration period was offered.

Collect evidence for a controlled exit

Collect evidence for a controlled exit
Suggested checkVerifiable record
ScopeAffected resource, operations, version, environment and policy; do not generalise one response to every route.
ConsumersOwners, SDKs, scheduled jobs and partner integrations; reconcile declared inventory and observed use.
TimelineAnnouncement origin, UTC dates, updates and authorised provider contact.
ReplacementTest existing journeys on the target: data, permissions, errors, pagination and side effects.
CoexistenceCutover criterion, rollback strategy and treatment of in-flight or replayed operations.
ClosureCheck remaining consumers, remove obsolete secrets, update documentation and verify the business outcome.

A useful alert connects a deadline to a consumer and a verifiable action. Record what was announced, what was actually tested and what remains unknown. If dates conflict, ask the provider for clarification before turning the timeline into a cutover schedule.

Sources, editions and credits

Original CIE summaries informed by RFCs 9745, 8594, 9651 and 9110. Fictional educational scenarios and checks. The comparison program is original; no RFC algorithm is reproduced. The second date example is written by CIE using GMT, following HTTP’s emission format.

IETF · RFC 9745 · Deprecation · Standards Track · March 2025 · §2–5 · consulted 2026-10-23

SHA-256 : 84d1c7e47062f92b08f12e83eee258c59cf6adef970fae938d92c30fa0a0411f

IETF · RFC 8594 · Sunset · Informational · May 2019 · §3–5, §8 · consulted 2026-10-23

SHA-256 : 1a20d634f9cb1d68295b5c501d32c68f43799dfbdb1e8b4ac21707b8c273aa80

IETF · RFC 9651 · Structured Fields · Standards Track · September 2024 · §3.3.7 · consulted 2026-10-23

SHA-256 : fe27f2ec8819911afbe4bd11f6fcb947580da4c49e5423a1fff960e252ced26d

IETF · RFC 9110 · HTTP semantics · Internet Standard · June 2022 · §5.6.7 · consulted 2026-10-23

SHA-256 : 21c1cdce6ab0e5509b04d84a28000836c7a087cf786efe6f04877ebfff47232a

公式参照文献

参照文献はメソッドを裏付けるものです。 チェックは状況に合わせて調整してください。 これらは認証ではありません。 元の参照文献のタイトルやソース文書は別の言語で書かれている場合があります。

参照資料の確認日 .