a6-recipe-circuit-breaker

Configures api-breaker plugin thresholds and recovery for API gateways.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps protect your API from cascading failures by automatically detecting unhealthy upstream services and temporarily stopping requests to them, preventing system-wide outages.

Core Features & Use Cases

  • Automatic Upstream Circuit Breaking: Implements the api-breaker plugin to manage circuit states.
  • Configurable Thresholds: Define unhealthy response codes and consecutive failures to trigger the circuit.
  • Automated Recovery: Manages cooldown periods and tests upstream health for recovery.
  • Use Case: Protect a critical microservice from intermittent backend failures by automatically routing traffic away from unhealthy instances and resuming when they recover.

Quick Start

Create a route with a basic circuit breaker configuration that returns a 502 error code when the upstream fails.

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 failures in an API gateway?

Circuit breakers prevent cascading failures in an API gateway by automatically detecting unhealthy upstream services and temporarily stopping requests to them, preventing system-wide outages.

How do I configure upstream circuit breaking in APISIX?

You can configure upstream circuit breaking in APISIX by creating a route with the api-breaker plugin, defining unhealthy response codes and setting consecutive failure thresholds to trigger the circuit.

What is an API circuit breaker and when do I need it?

An API circuit breaker is a resilience pattern that manages circuit states by monitoring upstream service health. You need it to protect critical microservices from intermittent backend failures and system-wide outages.

Does the APISIX circuit breaker support automated recovery?

Yes, the APISIX circuit breaker supports automated recovery by managing cooldown periods and continuously testing upstream health to determine when to resume traffic routing.

Can I define custom unhealthy thresholds for my API circuit breaker?

Yes, you can define custom unhealthy thresholds for your API circuit breaker by specifying unhealthy response codes and the number of consecutive failures required to trigger the breaker.

What response code does the circuit breaker return when an upstream fails?

The circuit breaker can be configured to return a 502 error code when the upstream service fails and crosses the defined unhealthy threshold, immediately stopping traffic to the unhealthy instance.