Giter VIP home page Giter VIP logo

gravitee-policy-circuit-breaker's Introduction

Circuit Breaker policy

Gravitee.io License Releases CircleCI

Phase

onRequest

onResponse

X

Description

This policy allows to switch to another backend or making the call fails with a 503 Service Unavailable in case of errors or latency. It is possible to configure errors and latency threshold rate to open the circuit breaker.

Implementation is based on Resilience4j, you can find more information on their documentation.

It guaranties high availability making your system resilient if your target is detected as failing.

Compatibility with APIM

Plugin version APIM version

Up to 1.x

All

Configuration

You can configure the policy with the following options:

Property Required Description Type Default

failureRateThreshold

X

Failure rate threshold before the circuit breaker switches to open state. A failure represents a response’s status code >= 500. The threshold is expressed as a percentage.

integer (min. 0, max.100)

50

slowCallRateThreshold

X

Slow call rate threshold before the circuit breaker switches to open state. A slow call is represented by a response time greater than the configured slowCallDurationThreshold. The threshold is expressed as a percentage.

integer (min. 0, max.100)

50

slowCallDurationThreshold

X

The duration threshold above which a call is considered as slow, increasing slowCallRateThreshold. The duration is expressed in milliseconds.

integer (min. 1)

1000

windowSize

X

The size of the sliding window which is used to record the outcome of calls when the circuit is closed.

integer (min. 0)

100

waitDurationInOpenState

The duration in millisecond before switching from open circuit to half-open.

integer (min. 1)

1000

redirectToURL

Redirect the call to the given URL instead of returning '503 Service Unavailable' status (supports EL)

string

scope

X

Cached response can be set for a single consumer (application) or for all applications.<br><strong>WARNING:</strong> Please be aware that by using an \"API\" scope, data will be shared between all consumers !

API / APPLICATION

APPLICATION

gravitee-policy-circuit-breaker's People

Contributors

graviteeio avatar gaetanmaisse avatar ytvnr avatar aelamrani avatar jhaeyaert avatar thibaudav avatar mouligno avatar brasseld avatar gcusnieux avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.