failure-engineering

Design resilient distributed systems with retries, circuit breakers, and idempotency.

4|Updated Oct 31, 2024
One-click install
npx skills add https://github.com/akshay-na/dotfiles --skill failure-engineering
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: failure-engineering
Source: https://github.com/akshay-na/dotfiles/tree/main/cursor/.cursor/skills/failure-engineering
Command: npx skills add https://github.com/akshay-na/dotfiles --skill failure-engineering

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps design and build software systems that can withstand and gracefully recover from inevitable failures in dependencies, networks, or internal components, ensuring continued operation or graceful degradation.

Core Features & Use Cases

  • Designing for Failure: Implements strategies like retries, circuit breakers, and fallbacks.
  • Resilience Testing: Guides chaos engineering practices to proactively identify weaknesses.
  • Use Case: When building a microservice that relies on a critical external API, this Skill ensures that if the API becomes unavailable, your service either uses cached data, returns a default response, or fails gracefully without crashing.

Quick Start

Use the failure-engineering skill to review the idempotency of a critical write operation.

Frequently Asked Questions about failure-engineering

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

FAQPage Schema
How do I implement a circuit breaker pattern to prevent cascading failures in microservices?

A circuit breaker pattern prevents cascading failures by blocking requests to a failing dependency, allowing it to recover. This Skill guides implementing circuit breakers alongside fallbacks and retries to manage network instability gracefully without crashing your service.

What is graceful degradation and how does it keep software running during dependency failures?

Graceful degradation keeps software running by providing partial functionality, like cached data or default responses, when a dependency fails. This Skill helps design systems that anticipate dependency unavailability and fail gracefully instead of crashing completely.

When do I need idempotency in distributed systems and how do I design for it?

Idempotency in distributed systems is needed when network instability causes retries or duplicate message deliveries. This Skill reviews critical write operations, ensuring repeated requests produce the same result without corrupting data or crashing the application.

How do I use chaos engineering to test fault tolerance and identify system weaknesses?

Chaos engineering tests fault tolerance by proactively injecting failures into a system to identify hidden weaknesses. This Skill guides resilience testing practices, simulating dependency failures and network instability to verify your fault tolerance strategies work under stress.

What's the best way to handle network instability and retry mechanisms in external API calls?

Handling network instability requires implementing retry mechanisms with proper backoff strategies and dead-letter queues for failed messages. This Skill ensures your service either uses cached data, returns default responses, or fails gracefully when external APIs become unavailable.

Why does my service crash when an external dependency becomes unavailable and how can I fix it?

Your service crashes because it lacks graceful degradation strategies for dependency failure scenarios. This Skill fixes it by guiding the implementation of circuit breakers, fallbacks, and dead-letter queues to manage cascading errors and maintain continued operation.