Skip to content

Use Redis Sentinel for Global Ratelimiting #5086

Open
@nebed

Description

@nebed

Description:

I am trying to use a redis sentinel cluster for global rate limiting. I see it is supported by envoyproxy here
EnvoyProxy Ratelimiting]
but when i try this for the redis config in envoy-gateway it doesn't work.

I give it a redis config like - "mymaster,envoy-redis.redis.cluster.local:26379"

and I get this error that it cannot find the host, which i guess is a parsing error
time="2025-01-17T12:27:54Z" level=error msg="creating redis connection error : dial tcp: lookup mymaster,envoy-redis.redis.cluster.local: no such host" panic: dial tcp: lookup mymaster,envoy-redis.redis.cluster.local: no such host goroutine 1 [running]: github.com/envoyproxy/ratelimit/src/redis.checkError(...) /ratelimit/src/redis/driver_impl.go:69 github.com/envoyproxy/ratelimit/src/redis.NewClientImpl({0x102f930, 0xc0001c85d0}, 0x0, {0x0, 0x0}, {0xc00004602a, 0x3}, {0xcd1d94, 0x6}, {0xc00004205a, ...}, ...) /ratelimit/src/redis/driver_impl.go:138 +0xae5 github.com/envoyproxy/ratelimit/src/redis.NewRateLimiterCacheImplFromSettings({0x0, {0xcc552f, 0x7}, 0x1f90, {0xcd2dea, 0x7}, 0x17b6, {0x0, 0x0}, {0xcd0d59, ...}, ...}, ...) /ratelimit/src/redis/cache_impl.go:25 +0x3a5 github.com/envoyproxy/ratelimit/src/service_cmd/runner.createLimiter({_, _}, {0x0, {0xcc552f, 0x7}, 0x1f90, {0xcd2dea, 0x7}, 0x17b6, {0x0, ...}, ...}, ...) /ratelimit/src/service_cmd/runner/runner.go:87 +0x454 github.com/envoyproxy/ratelimit/src/service_cmd/runner.(*Runner).Run(0xc0002bc508) /ratelimit/src/service_cmd/runner/runner.go:151 +0x565 main.main() /ratelimit/src/service_cmd/main.go:10 +0xbc

[optional Relevant Links:]

Any extra documentation required to understand the issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions