apiVersion: gateway.mulesoft.com/v1beta1
kind: Configuration
metadata:
name: circuit-breaker
spec:
circuitBreaker:
thresholds:
maxConnections: <number>
maxPendingRequests: <number>
maxRequests: <number>
maxRetries: <number>
maxConnectionPools: <number>
Configure Circuit Breaker in Local Mode
Omni Gateway offers these circuit breaker thresholds:
-
Maximum Connections
The maximum number of connections per API to an upstream service. -
Maximum Pending Requests
The maximum number of queued requests that can wait for a connection. -
Maximum Requests
The maximum number of outstanding requests to an upstream service. -
Maximum Retries
The maximum number of outstanding retries. -
Maximum Connection Pools
The maximum number of connection pools concurrently initiated to an upstream service.
When requests or connections exceed a threshold, Omni Gateway returns a 503 - Service Unavailable error.
|
All thresholds are optional. For Managed Omni Gateways and Connected Mode, each API instance has its own independent limit per upstream, so each can use the full threshold value. In Local Mode, different API instances share limits for the same upstream. For all modes, each gateway replica can use the full threshold value and limits aren’t distributed across replicas.
Configure circuit breaker thresholds in Local Mode via:
-
Configuration YAML resource: Applies to all API instances and is easy to adjust.
-
Policy: Applies to one API instance or upstream and provides granular control.
Configure Circuit Breaker via YAML Configuration Resources
To update your circuit breaker thresholds, edit and then apply this configuration resource:



