Setup CircuitBreakers

EnRoute Technical Reference

CircuitBreaker Plugin

Circuit breakers can be used to protect the upstream service and are an important component of distributed systems

CircuitBreaker Filter Configuration

CircuitBreaker filter configuration needs the following config

  • Max Connections - The max connections allowed against all upstreams
  • Max Pending Requests - The max number of pending requests that will be queued
  • Max Requests - Maximum number of outstanding requests against all upstreams
  • Max Retries - Maximum number of outstanding retries against all upstreams
Circuit Breaker config for EnRoute Kubernetes Ingress Controller

---
apiVersion: enroute.saaras.io/v1
kind: RouteFilter
metadata:
  labels:
    app: helloenroute-service-app
  name: helloenroute-8080-circuitbreakers
  namespace: hello-namespace
spec:
  name: helloenroute-8080-circuitbreakers
  type: route_filter_circuitbreakers
  routeFilterConfig:
    config: |
      {
        "max_connections" : 25,
        "max_pending_requests" : 15,
        "max_requests" : 125,
        "max_retries" : 5
      }
---