---
schema_version: "1"
id: 0619c719f5fb7c2d9186039861055e2e9b048ed6d8943bcf632bf11a2f6bb61d
title: Configure Circuit Breaker in Connected Mode
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.13/conn-circuit-breaker.md
canonical_url: https://docs.mulesoft.com/gateway/1.13/conn-circuit-breaker
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 128ea8f6e85ecad6aaa2f3f268111a4246291305bc5c180432bb37c5ce2541ef
description: MuleSoft Documentation Site
release: "1.13"
latest: false
---
---
product: Omni Gateway
version: 1.13
---

# Configure Circuit Breaker in Connected Mode

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

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.

> [!NOTE] 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 Connected Mode via:

- Runtime Manager runtime configurations: Applies to all API instances in the gateway.

- 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 in Runtime Manager

1.  In Anypoint Platform, select **Runtime Manager**.

2.  Select **Omni Gateways**.

3.  Select your Omni Gateway.

4.  Open **Runtime Configurations**.

5.  Open **Circuit Breaker**.

6.  Set values for **Maximum Connections**, **Maximum Pending Requests**, **Maximum Requests**,
    **Maximum Retries**, and **Maximum Connection Pools**.

7.  Apply the changes.

## Configure Circuit Breaker via YAML Configuration Resources

To update your circuit breaker thresholds, edit and then apply this configuration resource:

```yaml
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 via Policies

Apply the Circuit Breaker policy to your API instance or upstream service:

- [Circuit Breaker Policy](https://docs.mulesoft.com/gateway/1.13/policies-outbound-circuit-breaker)
