feat(19.3-01): share rate limits across instances through cooler's Redis store
- new module cooler: Install, Handle, OpenRedis (no URL in errors), RateLimitStore (atomic fixed-window Lua script with MemoryStore semantics, per-instance fallback) - serve installs cooler and publishes the Redis surf.Store before BuildRouter; BuildRouter looks up a published Store, route:list keeps the memory store - config keys http.rate_limit.store and redis.url; go-redis v9.23.0 - cooler README, root table row, surf README and rate-limiting, configuration and scaling docs
This commit is contained in:
2
go.mod
2
go.mod
@@ -21,6 +21,7 @@ require (
|
||||
github.com/knadh/koanf/v2 v2.3.6
|
||||
github.com/microcosm-cc/bluemonday v1.0.27
|
||||
github.com/nicksnyder/go-i18n/v2 v2.6.1
|
||||
github.com/redis/go-redis/v9 v9.23.0
|
||||
github.com/riverqueue/river v0.47.0
|
||||
github.com/riverqueue/river/riverdriver/riverdatabasesql v0.47.0
|
||||
github.com/riverqueue/river/rivertype v0.47.0
|
||||
@@ -114,6 +115,7 @@ require (
|
||||
go.opentelemetry.io/otel/sdk v1.44.0 // indirect
|
||||
go.opentelemetry.io/otel/sdk/metric v1.44.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.44.0 // indirect
|
||||
go.uber.org/atomic v1.12.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.5 // indirect
|
||||
golang.org/x/sync v0.23.0 // indirect
|
||||
golang.org/x/sys v0.48.0 // indirect
|
||||
|
||||
Reference in New Issue
Block a user