a6-recipe-circuit-breaker

Apply circuit-breaker logic to API routes with the a6 api-breaker plugin.

1|2|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/api7/a6 --skill a6-recipe-circuit-breaker-api7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: a6-recipe-circuit-breaker
Source: https://github.com/api7/a6/tree/main/skills/a6-recipe-circuit-breaker
Command: npx skills add https://github.com/api7/a6 --skill a6-recipe-circuit-breaker-api7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Circuit breakers protect APIs from upstream failures by automatically halting traffic to unhealthy services and enabling faster recovery.

Core Features & Use Cases

  • Per-route circuit breaking using the a6 api-breaker plugin to prevent cascading failures.
  • Configurable unhealthy/healthy thresholds, cooldown timing, and custom responses.
  • Integration with upstream health checks and declarative YAML configurations for reproducible deployments.

Quick Start

Configure a route with the api-breaker plugin and observe automatic circuit opening and recovery after failures.

Frequently Asked Questions about a6-recipe-circuit-breaker

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

FAQPage Schema
How do I prevent cascading API failures from unhealthy upstreams?

Circuit breakers prevent cascading API failures by automatically halting traffic to unhealthy upstream services and enabling faster recovery after failures.

How do I configure per-route circuit breaking for my APIs?

Per-route circuit breaking is configured declaratively using YAML files, applying the api-breaker plugin to specific routes and upstreams to stop traffic to failing services.

Can I customize unhealthy status codes and cooldown timing for circuit breakers?

Yes, circuit breakers support configurable unhealthy and healthy status codes, failure and success thresholds, cooldown timing, maximum breaker duration, and custom break response content.

Does the api-breaker plugin integrate with upstream health checks?

Yes, the circuit breaker integrates with upstream health checks and declarative YAML configurations to automatically open circuits during failures and recover services.

What is the best way to return a custom response when an upstream circuit opens?

The best way to return a custom response is by configuring optional break response content within the api-breaker plugin settings on your route, defining exactly what clients receive.