Understand the plugin's global singleton behavior
mainThe Crowdsec Bouncer Traefik plugin is designed such that only one instance of the plugin is possible within a Traefik instance. While you can declare multiple middlewares, they share global behaviors and configuration parameters:
- Shared Cache: All services protected by any instance of the plugin share the same cache. If an IP is banned in one middleware, it is denied across all services protected by the plugin.
- Cache Instantiation: If you define different caches for different middlewares, only the first one to be instantiated will be bound to the Crowdsec stream.
- Parameter Alignment: If you use multiple middlewares, key parameters like
MetricsUpdateIntervalSeconds,CrowdsecMode, andCrowdsecAppsecEnabledmust be aligned across them.