retry-fault-tolerance-design

Implements retry logic with exponential backoff, jitter, timeouts, and circuit breakers for external calls.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/joyz0/kitz-ai --skill retry-fault-tolerance-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: retry-fault-tolerance-design
Source: https://github.com/joyz0/kitz-ai/tree/main/docs/skills/retry-fault-tolerance-design
Command: npx skills add https://github.com/joyz0/kitz-ai --skill retry-fault-tolerance-design

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps systems recover from transient failures in external dependencies by adding structured retry logic, timeouts, and circuit breaker protections to avoid cascading failures and service degradation.

Core Features & Use Cases

  • Exponential backoff with jitter to reduce collision and retry storms during high contention.
  • Configurable timeouts and cancellation to bound resource usage for slow or stuck operations.
  • Circuit breaker with state transitions to stop calling unhealthy downstream services and allow controlled recovery.
  • Error classification and retry hooks to decide when retries are appropriate (HTTP 5xx, network errors, rate limits) versus permanent failures.
  • Use case: resilient HTTP client calls to third-party APIs with automatic retries, jittered backoff, timeouts, and a circuit breaker to protect the system during outages.

Quick Start

Call the retry-fault-tolerance-design skill to wrap an external HTTP request with 5 attempts, exponential backoff (minDelayMs 100, maxDelayMs 5000), jitter 0.2, a 3s timeout, and a circuit breaker configured to open after 5 consecutive failures.

Frequently Asked Questions about retry-fault-tolerance-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement retry logic with exponential backoff and jitter for HTTP requests?

To implement retry logic with exponential backoff and jitter, you wrap external HTTP calls with configurable minimum and maximum delays plus a jitter factor to space out requests, reducing collision and retry storms during high contention.

What is a circuit breaker and when do I need it for fault tolerance?

A circuit breaker is a fault tolerance mechanism that stops calling unhealthy downstream services by transitioning states, allowing controlled recovery. You need it to prevent cascading failures and service degradation when external dependencies experience outages or rate limits.

How do I prevent cascading failures when calling unreliable third-party APIs?

Prevent cascading failures with unreliable third-party APIs by combining configurable timeouts to bound resource usage, error classification hooks to retry only transient failures, and a circuit breaker to stop calling unhealthy downstream services during outages.

Can I configure timeouts and error classification for transient failures separately?

Yes, you can configure timeouts and error classification separately. Error classification and retry hooks decide when retries are appropriate for HTTP 5xx, network errors, or rate limits, while timeouts bound resource usage for slow or stuck operations independently.

Does retry fault tolerance work for both synchronous RPCs and asynchronous tasks?

Retry fault tolerance works for both synchronous RPCs and asynchronous tasks. The mechanism applies to any unreliable external calls where transient failures, rate limits, and timeouts occur, providing exponential backoff and circuit breaker state transitions.