Tyk v2.2 Documentation Components

  1. Home
  2. Tyk v2.2 Documentation Components
  3. Circuit Breakers Config: API Definition

Circuit Breakers Config: API Definition

To enable the breaker in your API Definition, you will need to add a new section to your versions’ extended_paths list:

"circuit_breakers": [
    {
        "path": "get",
        "method": "GET",
        "threshold_percent": 0.5,
        "samples": 5,
        "return_to_service_after": 60
    }
]
  • path: The path to match on.
  • method: The method to match on.
  • threshold_percent: The percentage of requests that can error before the breaker is tripped. This must be a value between 0.0 and 1.0.
  • samples: The number of samples to take for a circuit breaker window.
  • return_to_service_after: The cool-down period of the breaker to return to service (seconds).