redpanda-data/benthos

Support circuit breaking inputs

Opened this issue · 2 comments

When processing from a FIFO input stream a fail in a connected REST Service should possibly trigger a circuit breaking of the input stream.
Might be necessary for Inputs to declare internally, whether they support Circuit Breaking natively though.
Config could be:

processors:
- circuit_breaker:
    half_open_max_requests: 2
    interval: "1s"
    open_timeout: 60s
    trip: |
      root = this.requests >= 3 && (this.total_failures / this.requests) >= 0.6
    processors:
    - http:

Thanks for the enhancement request @AndreasBergmeier6176! There was a similar proposal in the past: redpanda-data/connect#1069 Unfortunately, that didn't make it as a feature. What does half_open_max_requests represent and what is a trip? Would you happen to have some examples from other systems where this is implemented?

Thanks for the enhancement request @AndreasBergmeier6176! There was a similar proposal in the past: redpanda-data/connect#1069 Unfortunately, that didn't make it as a feature. What does half_open_max_requests represent and what is a trip? Would you happen to have some examples from other systems where this is implemented?

I modeled this mostly after https://github.com/sony/gobreaker

Another quite popular implementation is Envoy: https://www.envoyproxy.io/docs/envoy/latest/configuration/upstream/cluster_manager/cluster_circuit_breakers