Skip to content
StackPractices

Tag: resilience

Browse 24 practical software engineering resources tagged with "resilience". Discover code recipes, design patterns, documentation templates, and in-depth guides to help you build, deploy, and maintain production-ready solutions involving resilience.

Retry with Exponential Backoff

Implement resilient retry strategies with exponential backoff, jitter, and circuit breaker integration for transient failure recovery.

Chaos Engineering

Build resilient systems by intentionally injecting failures and observing how your distributed services respond and recover.

Dead Letter Queues

Handle failed messages gracefully with dead letter queues, retry policies, and poison pill detection in message-driven architectures.

LLM Fallback Pattern

Fall back to alternative LLM providers or models when the primary fails. Handle rate limits, timeouts, and errors gracefully with a provider chain.

Back-Pressure Pattern

Prevent upstream systems from overwhelming downstream consumers by propagating flow-control signals backward through the pipeline, ensuring stable throughput under load.

Circuit Breaker Pattern

Prevent cascading failures by stopping requests to failing services. An architectural pattern for resilient distributed systems.

Compensating Transaction Pattern

Undo the effects of a completed transaction by executing a counter-operation, enabling eventual consistency in long-running business processes across distributed services.

Graceful Degradation Pattern

Degrade functionality instead of failing when dependencies are unavailable. Serve partial results, cached data, or fallback features to keep users running.

Retry Pattern

Retry an operation that has failed with transient errors, using configurable strategies like fixed delay, exponential backoff, or circuit breaker integration.

Scheduler Agent Supervisor Pattern

Coordinate resilient job scheduling by separating scheduling logic from execution agents and adding a supervisor that monitors, restarts, and manages agent lifecycle.

Shed Load Pattern

Drop requests proactively under extreme load to protect the system. Reject excess traffic before it consumes resources and causes cascading failures.

Timeout Pattern

Prevent operations from hanging indefinitely by enforcing a maximum execution time. A resilience pattern for predictable response times.

Circuit Breaker with Monitoring

How to expose circuit breaker state as metrics for observability. Covers Prometheus integration, alerting rules, dashboards, and state transitions.

Bulkhead Pattern: Isolate Resources to Limit Blast Radius

How to isolate resources per service to limit blast radius. Covers thread pool isolation, connection pool partitioning, semaphore-based bulkheads, and resource quotas.

Circuit Breaker Half-Open

How to test service recovery with half-open circuit breaker state transitions. Covers closed, open, half-open states, trial requests, and gradual recovery.

Fallover: Switch to Standby on Primary Failure Detection

How to switch to a standby system on primary failure detection. Covers active-passive, active-active, health monitoring, DNS fallover, database replication, and automated promotion.

Graceful Shutdown: Drain In-Flight Requests Before Exit

How to drain in-flight requests before process exit. Covers signal handling, health check removal, connection draining, timeout enforcement, and cleanup hooks.

Token Bucket Rate Limiter: Smooth Traffic with Token Buckets

How to implement token bucket rate limiting for API protection. Covers bucket refill, burst handling, per-key buckets, distributed rate limiting with Redis, and sliding windows.

Retry with Jitter: Exponential Backoff and Random Jitter

How to retry failed operations with exponential backoff and random jitter. Covers full jitter, equal jitter, decorrelated jitter, retry budgets, and idempotency.

Backup Verification Test Template

A template to plan and document backup verification tests, ensuring restore procedures work before an emergency.

API Gateway Design: Resilience, Routing, and Security

A practical guide to designing API gateways: routing patterns, rate limiting, authentication, circuit breakers, and observability for resilient APIs.

Chaos Engineering — Principles, Tools, and Safe Experiments

A practical guide to chaos engineering: build resilient systems by intentionally injecting failures. Learn the five principles, Litmus, Gremlin, and Chaos Mesh.

API Rate Limiting — Design Fair and Useful Throttling

A practical guide to API rate limiting: token bucket, leaky bucket, sliding window algorithms, choosing limits, and implementing resilient throttling for APIs.

Disaster Recovery: RTO, RPO, and Resilient Recovery Runbooks

A practical guide to disaster recovery planning: defining RTO and RPO, backup strategies, multi-region failover, and building recovery runbooks that minimize downtime.