Skip to main content

HTTPS Edge 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,"tripped_duration":120,"rolling_window":300,"num_buckets":5,"volume_threshold":20,"error_threshold_percentage":0.2}' \
https://api.ngrok.com/edges/https/edghts_2TMGJIJ4Yu3fGedHlq8UqeYCsW0/routes/edghtsrt_2TMGJIs0QpNPOilidBTOa9lzAcK/circuit_breaker

Parameters

   
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,
"tripped_duration": 120,
"rolling_window": 300,
"num_buckets": 5,
"volume_threshold": 20,
"error_threshold_percentage": 0.2
}

Fields

   
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_2TMGJIJ4Yu3fGedHlq8UqeYCsW0/routes/edghtsrt_2TMGJIs0QpNPOilidBTOa9lzAcK/circuit_breaker

Response

Returns a 200 response on success

Example Response

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

Fields

   
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_2TMGJIJ4Yu3fGedHlq8UqeYCsW0/routes/edghtsrt_2TMGJIs0QpNPOilidBTOa9lzAcK/circuit_breaker

Response

Returns a 204 response with no body on success