Skip to main content

Edge Route Circuit Breaker Module

Replace HTTPS Edge Route Circuit Breaker Module

Request

PUT /edges/https/{edge_id}/routes/{id}/circuit_breaker

Example Request

curl \
-X PUT \
-H "Authorization: Bearer {API_KEY}" \
-H "Content-Type: application/json" \
-H "Ngrok-Version: 2" \
-d '{"enabled":true,"error_threshold_percentage":0.2,"num_buckets":5,"rolling_window":300,"tripped_duration":120,"volume_threshold":20}' \
https://api.ngrok.com/edges/https/edghts_2k5okO2H0QddNAovgIG8fzVrpby/routes/edghtsrt_2k5okLyT5QoaddW5tH61B0pjgrL/circuit_breaker

Parameters

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
tripped_durationuint32Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream health
rolling_windowuint32Integer number of seconds in the statistical rolling window that metrics are retained for.
num_bucketsuint32Integer number of buckets into which metrics are retained. Max 128.
volume_thresholduint32Integer number of requests in a rolling window that will trip the circuit. Helpful if traffic volume is low.
error_threshold_percentagefloat64Error threshold percentage should be between 0 - 1.0, not 0-100.0

Response

Returns a 200 response on success

Example Response

{
"enabled": true,
"error_threshold_percentage": 0.2,
"num_buckets": 5,
"rolling_window": 300,
"tripped_duration": 120,
"volume_threshold": 20
}

Fields

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
tripped_durationuint32Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream health
rolling_windowuint32Integer number of seconds in the statistical rolling window that metrics are retained for.
num_bucketsuint32Integer number of buckets into which metrics are retained. Max 128.
volume_thresholduint32Integer number of requests in a rolling window that will trip the circuit. Helpful if traffic volume is low.
error_threshold_percentagefloat64Error threshold percentage should be between 0 - 1.0, not 0-100.0

Get HTTPS Edge Route Circuit Breaker Module

Request

GET /edges/https/{edge_id}/routes/{id}/circuit_breaker

Example Request

curl \
-X GET \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2k5okO2H0QddNAovgIG8fzVrpby/routes/edghtsrt_2k5okLyT5QoaddW5tH61B0pjgrL/circuit_breaker

Response

Returns a 200 response on success

Example Response

{
"enabled": true,
"error_threshold_percentage": 0.2,
"num_buckets": 5,
"rolling_window": 300,
"tripped_duration": 120,
"volume_threshold": 20
}

Fields

NameTypeDescription
enabledbooleantrue if the module will be applied to traffic, false to disable. default true if unspecified
tripped_durationuint32Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream health
rolling_windowuint32Integer number of seconds in the statistical rolling window that metrics are retained for.
num_bucketsuint32Integer number of buckets into which metrics are retained. Max 128.
volume_thresholduint32Integer number of requests in a rolling window that will trip the circuit. Helpful if traffic volume is low.
error_threshold_percentagefloat64Error threshold percentage should be between 0 - 1.0, not 0-100.0

Delete HTTPS Edge Route Circuit Breaker Module

Request

DELETE /edges/https/{edge_id}/routes/{id}/circuit_breaker

Example Request

curl \
-X DELETE \
-H "Authorization: Bearer {API_KEY}" \
-H "Ngrok-Version: 2" \
https://api.ngrok.com/edges/https/edghts_2k5okO2H0QddNAovgIG8fzVrpby/routes/edghtsrt_2k5okLyT5QoaddW5tH61B0pjgrL/circuit_breaker

Response

Returns a 204 response with no body on success