Skip to content
Ironflow is pre-1.0: APIs can change between releases. Pin a version. What is ready →

ironflow circuit-breaker

Manage circuit breakers that protect push endpoints from cascading failures. Circuit breaker state is persisted in the database and is cluster-consistent (consulted at dispatch reservation time).

Terminal window
ironflow circuit-breaker <subcommand> [flags]

Aliases: cb

Both subcommands send X-Ironflow-Environment-ID when --env or IRONFLOW_ENV names an environment. Without either, an environment-bound API key uses its own environment. A platform key lists every environment and must name one to reset a breaker. The server validates environment and tenant access.

Terminal window
set -lx IRONFLOW_ENV env_default_staging
ironflow circuit-breaker list
ironflow circuit-breaker reset my-function-id

List circuit breakers in the selected environment with their function IDs, endpoints, states, and failure counts.

Terminal window
ironflow circuit-breaker list [flags]

Flags:

FlagShortTypeDefaultDescription
--server-sstringServer URL (default: IRONFLOW_SERVER_URL or http://localhost:9123)
--jsonboolfalseOutput as JSON
--env-estringEnvironment ID. Default: IRONFLOW_ENV; with neither, no environment is sent

Examples:

Terminal window
# List circuit breakers in the selected environment
ironflow circuit-breaker list
# JSON output
ironflow circuit-breaker list --json
# Custom server
ironflow circuit-breaker list -s http://localhost:9000

Output columns:

ColumnDescription
ENVIRONMENTThe environment the breaker belongs to
FUNCTION_IDThe function that owns this circuit breaker
ENDPOINTThe push endpoint URL being protected
STATECurrent state: closed, open, or half-open
FAILSNumber of consecutive failures
LAST_FAILURETimestamp of the most recent failure

Reset a circuit breaker back to closed state, allowing requests to flow to the endpoint again. Accepts either an endpoint URL or a function ID. If the argument contains :// it is treated as an endpoint URL; otherwise it is treated as a function ID. A reset also clears the escalated open window, sets the ironflow_circuit_breaker_state gauge to closed and publishes the system.circuit_breaker.closed.{functionId} event.

Terminal window
ironflow circuit-breaker reset <endpoint-url | function-id> [flags]

Arguments:

ArgumentRequiredDescription
endpoint-urlYes*The endpoint URL of the breaker to reset
function-idYes*The function ID of the breaker to reset

*Provide either an endpoint URL or a function ID.

Breakers are keyed by environment and function ID. A reset acts in one environment. An environment-bound API key uses its own environment and needs no flag. A platform key must name the environment with --env or IRONFLOW_ENV; without one, the server answers 400 environment required: set X-Ironflow-Environment-ID. With list, the same flag scopes the listing; a platform key without it lists every environment.

Flags:

FlagShortTypeDefaultDescription
--server-sstringServer URL (default: IRONFLOW_SERVER_URL or http://localhost:9123)
--env-estringEnvironment ID. Default: IRONFLOW_ENV; with neither, no environment is sent

Examples:

Terminal window
# Reset a circuit breaker by endpoint URL
ironflow circuit-breaker reset https://my-app.example.com/api/handler
# Reset a circuit breaker by function ID
ironflow circuit-breaker reset my-function-id
# Reset a breaker in the staging environment with a platform key
ironflow circuit-breaker reset my-function-id --env env_default_staging