levee icon indicating copy to clipboard operation
levee copied to clipboard

Multiple requests

Open louis-quaintance opened this issue 9 years ago • 2 comments

Hi there,

Love this module!

Just wandering if I am making multiple requests to different endpoints, do I need a circuit per endpoint url?

Thanks Louis

louis-quaintance avatar Sep 12 '15 18:09 louis-quaintance

Hey Louis,

Thanks for asking. In this case, levee doesn't hold an opinion as to how granular each breaker behaves. In the example you can see the get is wrapped, meaning all endpoints are managed using a single breaker. This is probably too coarse as different hosts and resources have significantly different SLAs, meaning one resource could trip the breaker blocking get from reaching the entire internet. (That said, it makes for a simple example).

Where I work, when used with HTTP, AFAIK we have a breaker per resource as individual endpoints within a service do varying amounts of work, have different SLAs, and may require distinctly different timeouts. Then we apply smart defaults for a given service (all endpoints), and allow configuration individual endpoints on an as needed basis. This provides granular control, but it also (via stats) gives insight into the behavior of individual endpoints, which can be useful.

I hope that helps, but if not let me know!

totherik avatar Sep 14 '15 15:09 totherik

@totherik question on this - does the path (first param to run) need to be unique for each resource in order to prevent one service from tripping a circuitbreaker on another ?

jooj123 avatar Jun 06 '18 07:06 jooj123