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_2gsqMMwKXmy90TfEmuxCjVX2VPy/routes/edghtsrt_2gsqMMfQwxoomTEjkvxcJ79NP2c/circuit_breaker
Parameters
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
tripped_duration | uint32 | Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream health |
rolling_window | uint32 | Integer number of seconds in the statistical rolling window that metrics are retained for. |
num_buckets | uint32 | Integer number of buckets into which metrics are retained. Max 128. |
volume_threshold | uint32 | Integer number of requests in a rolling window that will trip the circuit. Helpful if traffic volume is low. |
error_threshold_percentage | float64 | Error 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
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
tripped_duration | uint32 | Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream health |
rolling_window | uint32 | Integer number of seconds in the statistical rolling window that metrics are retained for. |
num_buckets | uint32 | Integer number of buckets into which metrics are retained. Max 128. |
volume_threshold | uint32 | Integer number of requests in a rolling window that will trip the circuit. Helpful if traffic volume is low. |
error_threshold_percentage | float64 | Error 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_2gsqMMwKXmy90TfEmuxCjVX2VPy/routes/edghtsrt_2gsqMMfQwxoomTEjkvxcJ79NP2c/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
Name | Type | Description |
---|---|---|
enabled | boolean | true if the module will be applied to traffic, false to disable. default true if unspecified |
tripped_duration | uint32 | Integer number of seconds after which the circuit is tripped to wait before re-evaluating upstream health |
rolling_window | uint32 | Integer number of seconds in the statistical rolling window that metrics are retained for. |
num_buckets | uint32 | Integer number of buckets into which metrics are retained. Max 128. |
volume_threshold | uint32 | Integer number of requests in a rolling window that will trip the circuit. Helpful if traffic volume is low. |
error_threshold_percentage | float64 | Error 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_2gsqMMwKXmy90TfEmuxCjVX2VPy/routes/edghtsrt_2gsqMMfQwxoomTEjkvxcJ79NP2c/circuit_breaker
Response
Returns a 204 response with no body on success