crowdsec icon indicating copy to clipboard operation
crowdsec copied to clipboard

Improvement/ decisionsStream should handle bouncer in a multiple nodes context

Open he2ss opened this issue 3 years ago • 0 comments

Now, if we use one bouncer key in a multi-nodes context (ingress nginx for example). Each node is using the same bouncer key, so the decisions will never been completely redistributed to all nodes, because of the way we handle the decisionsStream (we have a session by API key).

After a discussion with the crowdsec core team, it seems that we had 2 possibilities to handle this :

  • Improving decisionsStream to have a session by "API key+IP", so each node will have it own stream context
  • In each bouncer, add lastpull date parameter and use it in crowdsec API to retreive decisions since lastpull.

IMO, it's better to improve crowdsec directly to avoid changing code in each bouncer + versioning the local API to handle old bouncers versions without the new param.

he2ss avatar Jun 22 '22 08:06 he2ss