Cloud API Management Circuit Breaker Service Adapter Configuration Values
Configuration Values
The following configuration values can be defined while configuring the Circuit Breaker Service adapter on the Call Transformation page:
| Field name | Type | Field Value | Required/Optional | Description |
|---|---|---|---|---|
| Processing Adapter | String | CAM_Circuit_Breaker_Service | Required | Adapter to trip the circuit open on receiving failed responses from the backend server. |
| Perform Pre-processing | Boolean | Enabled / Disabled | Required | 1. When enabled, Perform-post processing must also be enabled. 2. When enabled, the circuit breaker compares the configured API response time with the actual response time before forwarding the request to the backend. |
| Data to make available for pre-processing (PreInput Value) | Map | |||
| Float (Greater than 0, less than 100) | obs-error-percentage | Required | The threshold error percentage after which the circuit will trip for the given observation window (obs-window). | |
| Integer (Greater than 0) | obs-open-duration | Required | Duration to wait in the open state. In minutes. | |
| Integer (Greater than 0) | obs-window | Required | If the window type is duration, the obs-window value is treated as a duration in minutes. If the window type is duration is count, the obs-window value is treated as the number of calls. | |
| Float (Greater than 0, less than 100) | obs-slow-call-rate | Optional | The threshold slow call percentage after which the circuit will trip for the given observation window. | |
| Integer (Greater than 0) | obs-slow-call-duration | Optional | The threshold for slow call duration in milliseconds. Any call duration above this duration will be recorded as a slow call. | |
| Integer (Greater than 0) | permit-half-open | Required | Number of calls to be permitted in the half-open state. The decision of whether the circuit moves to the closed state is based on whether more error percentage calls succeed in the half-open state than the permitted number of calls. | |
| Integer (Greater than 0) | min-calls | Required | The minimum number of calls to be considered when calculating the error percentage. | |
| Integer (Default values: 1000 ms, 1 second) | cleanup-delay | Optional | This timeout period is the duration to wait after connect + read timeout to clean up the post-process that was not running. It specifically applies to situations where a Gateway Timeout stops the post-process from running. When this happens, an error is triggered on the circuit breaker object, which then updates the error count within the observation window. | |
| Perform Post-processing | Boolean | Enabled / Disabled | - | This field is required to be enabled if the Perform pre-processing field is enabled. |
| Data to make available for post-processing (PostInput Value) | Map | |||
| Integer (500,400,401,402,403) | http-status-list | Required | All status codes (500,400,401,402,403) increment the error call count by 1. |
Configuration Steps
Refer to the Configuring Call Transformation for an Endpoint for more information on the configuration steps.