resilience-patterns

Codify resilience patterns for NodeJS microservices with bulkhead isolation and timeout policies.

1|Updated Sep 14, 2025
One-click install
npx skills add https://github.com/CleanExpo/DR-NRPG --skill resilience-patterns-cleanexpo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resilience-patterns
Source: https://github.com/CleanExpo/DR-NRPG/tree/main/.skills/custom/resilience-patterns
Command: npx skills add https://github.com/CleanExpo/DR-NRPG --skill resilience-patterns-cleanexpo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the critical need for applications to remain functional and stable even when external services fail or experience latency, preventing cascading failures and ensuring a consistent user experience.

Core Features & Use Cases

  • Bulkhead Isolation: Prevents a single failing dependency from exhausting resources and impacting other services.
  • Timeout Policies: Ensures operations don't hang indefinitely, failing fast when external calls take too long.
  • Fallback Strategies: Provides alternative responses or actions when primary services are unavailable.
  • Hedged Requests: Improves latency-sensitive operations by making parallel requests and accepting the first response.
  • Degraded Mode: Allows the application to operate with reduced functionality during outages.
  • Use Case: When your AI provider (like Anthropic or Ollama) is down, this skill ensures your application can still provide a cached response or a helpful message instead of crashing.

Quick Start

Implement bulkhead isolation for the 'ollama' provider with a maximum of 5 concurrent requests.

Frequently Asked Questions about resilience-patterns

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

FAQPage Schema
How do I prevent cascading failures in microservices when external dependencies hang?

Prevent cascading failures by implementing bulkhead isolation and timeout policies to contain failures and fail fast. This stops a single unresponsive dependency from exhausting application resources and impacting other services.

What is the best way to handle API outages and provide fallback responses in NodeJS?

Handle API outages by implementing fallback strategies that provide alternative responses or actions. This enables degraded mode operation, allowing your application to return cached responses instead of crashing during external service failures.

How do bulkhead isolation and hedged requests improve microservice fault tolerance?

Bulkhead isolation improves fault tolerance by limiting concurrent requests to prevent resource exhaustion, while hedged requests improve latency by issuing parallel calls and accepting the first available response.

Can I implement concurrency limits and custom exception handling for microservices without external dependencies?

Yes, you can implement concurrency limits and custom exception handling without external dependencies. The skill uses built-in asyncio semaphores and concurrent.futures to manage fault tolerance and robust error handling natively.

When should I use hedged requests for latency optimization in distributed systems?

Use hedged requests for latency-sensitive operations where waiting on a single slow service degrades performance. This approach issues parallel requests and accepts the first response, optimizing overall application latency.

Does this resilience pattern skill work with AI providers like Anthropic and Ollama?

Yes, it works with AI providers like Anthropic and Ollama. When these external services experience downtime, the skill ensures your application remains stable by providing fallback responses and operating in a degraded mode.