crowdsec
crowdsec copied to clipboard
Improvement/ decisionsStream should handle bouncer in a multiple nodes context
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.