---
schema_version: "1"
id: 52e70ab8505d960a089f5e12f7d3a6c670581d557b5ba643a5cb6b0386a9d90a
title: Configure Circuit Breaker for Managed Omni Gateway
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/latest/managed-circuit-breaker.md
canonical_url: https://docs.mulesoft.com/gateway/latest/managed-circuit-breaker
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2b711852d309c4238b46cc5b04a7cac64133950605ed4bb15c956eb3789eab95
description: MuleSoft Documentation Site
release: "1.14"
latest: true
---
---
product: Omni Gateway
version: 1.14
is-latest-version: true
---

# Configure Circuit Breaker for Managed Omni Gateway

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

Circuit breaker protection stops Omni Gateway from overwhelming an upstream service. When the number
of connections, requests, or retries to an upstream exceeds a configured threshold, the circuit
breaker rejects requests with a `503 - Service Unavailable` error until traffic returns to within
the threshold.

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 for Managed Omni Gateway via:

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

- Policy: Applies to one API instance or upstream and provides granular control.

## Configuration Precedence

When you configure a setting in more than one place, Omni Gateway uses the first value that is set,
in this order of precedence:

1.  **Policy**: A policy applied to the API instance.

2.  **Runtime Manager runtime configuration**: Used if no policy value is set.

3.  **Built-in default**: Used if neither of the other values is set. A policy value overrides the
    gateway-level value for the API instance it’s applied to. API instances without the policy use
    the gateway-level value.

## 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 Policies

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

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