Traefik (pronounced traffic) is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy. This fork extends the open-source Traefik with enterprise-grade features, focusing on distributed capabilities for high-availability environments.
This distribution is based on Traefik 2.x, includes the following enterprise-grade features:
- Distributed Rate Limiter: Coordinate rate limiting across your entire Traefik cluster for consistent API protection
- Distributed Cache: Improve performance with a cluster-wide caching system
- Coming Soon: Distributed Inflight Request Limiting: Prevent system overload with coordinated request management
All distributed features are designed to work seamlessly in multi-node deployments without additional configuration.
To utilize the distributed features, you'll need:
- Memcached server(s) for cluster coordination
- Basic Traefik configuration with the following additions to your
traefik.yaml
:
memcached:
# Single node
address: "localhost:11211"
# Multiple nodes configuration soon
Checkout the examples here.
Enable cache on the endpoint. Configurations available:
-
ttl
— Cache ttl. Default to 300ms -
variationHeaders
— Different value for these headers will have its own cache. For example if you cache user profile endpoint each authorization header/access token will be treated as different value.
For conveniency and concistency, this module will only cache GET method and http 200 status. If the request is not GET or the response is not 200, it will not cached and forwarded directly to the service. This middleware has no cache invalidator except ttl. Use wisely
Distributed rate limiter through cluster/replicas. Configuration available:
-
burst
required — total request allowed per ip -
period
required — Golangtime.Duration
reff
- The same exact feature as of now, but distributed through cluster/replicas
Supported in all providers available in Traefik.
If you'd like to contribute to the project, refer to the contributing documentation.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project, you agree to abide by its terms.