Service Resilienceのロゴ

Service Resilience

コミュニティ
d-padmanabhan
service-resilience

Designs and reviews production resilience for service dependencies using deadlines, timeouts, bounded retries, circuit breakers, bulkheads, backpressure, load shedding, rate limits, fallbacks, idempotency, and recovery testing. Use when the user mentions circuit breaker, bulkhead, retries, cascading failure, partial failure, overload, graceful degradation, or resilient distributed services.

概要

公開者d-padmanabhan
リポジトリagent-engineering-handbook
スキル名service-resilience
スター
20
フォーク
3
同梱ファイル
3
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    d-padmanabhanがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Service Resilience」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/service-resilience
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbook.git /tmp/agent-engineering-handbook
mkdir -p .claude/skills
cp -r /tmp/agent-engineering-handbook/skills/service-resilience .claude/skills/service-resilience
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでService Resilienceを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にService Resilienceを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Service Resilienceは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Service Resilience

Design resilience as a bounded failure policy, not a collection of decorators. Every mechanism must protect a stated critical journey without creating retry storms, stale success, hidden data loss, or fragmented capacity.

Resilience Contract

  • Begin with critical journeys, SLOs, dependency budgets, and acceptable degraded outcomes.
  • Put one end-to-end deadline around the operation. Allocate smaller attempt timeouts within it.
  • Retry only classified transient failures for idempotent operations or operations protected by stable idempotency keys.
  • Bound attempts, elapsed time, concurrency, queues, memory, and retry amplification.
  • Isolate unrelated workloads with bulkheads sized from capacity and priority.
  • Shed excess work before saturation destroys useful throughput.
  • Use circuit breakers only when rejecting likely failures is cheaper and safer than attempting them.
  • Treat fallbacks as alternate correctness contracts. Never return stale or fabricated success silently.
  • Make ambiguous mutation outcomes reconcilable.
  • Test failure, overload, recovery, and control-plane behavior with measurable acceptance criteria.

Design Workflow

1. Define the critical journey

State:

  • caller and business outcome;
  • availability and latency SLO;
  • synchronous dependencies;
  • consistency and freshness requirements;
  • acceptable partial or degraded result;
  • operations that must fail closed;
  • recovery owner and escalation path.

Do not apply one resilience policy to every endpoint or workload.

2. Allocate time and failure budgets

For each synchronous dependency, define:

  • end-to-end deadline contribution;
  • connect, request, and response timeout;
  • retry owner and maximum attempts;
  • transient failure classification;
  • idempotency or reconciliation contract;
  • concurrency and queue budget;
  • fallback or explicit failure behavior.

Account for DNS, connection pools, proxies, SDK retries, service meshes, and gateways. Hidden retries consume the same caller deadline and multiply load.

3. Control load

Apply controls in this order:

  1. admission priority and per-principal quotas;
  2. bounded queues with maximum age;
  3. bounded concurrency and connection pools;
  4. backpressure or producer throttling;
  5. load shedding with explicit retry guidance;
  6. capacity scaling where it is fast enough to matter.

Do not rely on autoscaling after queues, memory, or downstream capacity are already exhausted.

4. Isolate failure

Choose bulkheads around workloads that should not consume one another's capacity:

  • dependency-specific connection pools;
  • workload-specific worker pools or semaphores;
  • priority queues;
  • tenant or customer partitions;
  • cells or deployment stamps;
  • separate resource quotas.

Document reserved capacity, utilization trade-offs, fairness, and what happens when one partition is full.

Use the circuit breaker and bulkhead reference (${HANDBOOK_ROOT}/skills/service-resilience/references/circuit-breakers-and-bulkheads.md) for detailed state and sizing rules.

5. Limit repeated failure

Use a circuit breaker only when:

  • failures are expensive enough to threaten caller or dependency capacity;
  • recent outcomes predict near-term failure;
  • calls can be rejected safely;
  • recovery can be probed with bounded traffic;
  • state scope and observability are defined.

A breaker does not replace timeouts, retries, admission control, or health checks. Avoid a global breaker when one tenant, endpoint, shard, region, or operation can fail independently.

6. Define degraded behavior

For every fallback, specify:

  • trigger;
  • data source and maximum staleness;
  • authorization and privacy equivalence;
  • user-visible indication;
  • unsupported operations;
  • cache invalidation or recovery;
  • metric proving whether the fallback helps.

Prefer explicit unavailability over plausible but incorrect data.

7. Verify recovery

Test:

  • timeout and cancellation propagation;
  • retry amplification at each layer;
  • breaker opening, probing, and closing;
  • bulkhead exhaustion and unaffected workloads;
  • queue age and shedding;
  • dependency brownouts and slow responses;
  • recovery without synchronized request floods;
  • regional, quota, identity, DNS, and configuration failures;
  • reconciliation after ambiguous writes.

Use the failure policy reference (${HANDBOOK_ROOT}/skills/service-resilience/references/failure-policy-and-testing.md) for review and experiment design.

Pattern Selection

ProblemPrimary controlImportant companion
Slow dependencyDeadline and attempt timeoutCancellation and bounded concurrency
Brief transient failureBounded jittered retryIdempotency and retry budget
Sustained likely failureCircuit breakerTimeout, observability, recovery probe
One workload starves anotherBulkheadPriority, quotas, capacity plan
Offered load exceeds capacityAdmission control and sheddingBackpressure and retry guidance
Optional dependency unavailableExplicit fallbackFreshness and correctness contract
Mutation timed outReconciliationStable operation ID or idempotency key
Long asynchronous backlogQueue-age limitsConsumer scaling, DLQ, replay policy

Anti-Patterns

  • Retrying every exception at every layer.
  • Retrying non-idempotent mutations with a new request ID.
  • Circuit breaker keyed globally across unrelated tenants or operations.
  • Opening a breaker on caller validation or authorization failures.
  • Half-open mode releasing an unbounded probe flood.
  • Bulkheads with arbitrary sizes and no capacity or fairness model.
  • Unbounded queues presented as reliability.
  • Fallbacks that bypass authorization or return stale data as current.
  • Health checks that call every dependency and cause synchronized failure.
  • Catching errors and returning success to improve availability metrics.
  • Chaos tests without hypotheses, blast-radius controls, or abort conditions.

Required Output

Produce:

  1. Critical journey, SLO, and dependency map
  2. End-to-end deadline and retry budget
  3. Failure classification and idempotency contract
  4. Admission, concurrency, queue, and bulkhead policy
  5. Circuit breaker scope and state policy where justified
  6. Degraded behavior and correctness limits
  7. Metrics, alerts, and recovery ownership
  8. Failure experiments, acceptance criteria, and rollback triggers

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Service Resilience」では何ができますか?

Designs and reviews production resilience for service dependencies using deadlines, timeouts, bounded retries, circuit breakers, bulkheads, backpressure, load shedding, rate limits, fallbacks, idempotency, and recovery testing. Use when the user mentions circuit breaker, bulkhead, retries, cascading failure, partial failure, overload, graceful degradation, or resilient distributed services.

TypingMindでService Resilienceを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Service Resilienceはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにService Resilienceをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/service-resilienceを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Service Resilienceを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Service Resilienceで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもService Resilienceを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Service Resilience」は無料ですか?

はい。d-padmanabhanがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇