Configuration Reference
The Traffic Policy configuration reference for this action.Supported Phases
on_http_request
Type
circuit-breaker
Configuration Fields
Threshold percentage of errors that must be met before requests are
rejected.Must be a value between
0.0
and 1.0
.Number of requests in a rolling window before checking the error
threshold.Must be a number between
1
and 2,000,000,000
.Number of seconds in the rolling window that metrics are retained for.Must be a value between
1s
and 2m
.Number of seconds the system waits after rejecting a request before
re-evaluating upstream health.Must be a value between
1s
and 2m
.Number of buckets that metrics are divided into within the rolling window.Fixed at
10
.Determines if the circuit breaker is active.If
false
, the circuit breaker never trips, and no requests are rejected.Examples
Basic Example
This example configuration sets up an endpoint (hotdog.ngrok.app
) that allows
only 1 request every 60 seconds and trips the circuit breaker for 2 minutes.
Example Traffic Policy Document
Start Endpoint with Traffic Policy
Helper script
circuit_breaker.py
Action Result Variables
The following variables are made available for use in subsequent expressions and CEL interpolations after the action has run. Variable values will only apply to the last action execution, results are not concatenated.This action does not expose any result variables.