• Matthew Slipper's avatar
    proxyd: Custom rate limiter implementation · c2b8efac
    Matthew Slipper authored
    Our current proxyd deployment does not share rate limit state across multiple servers within a backend group. This means that rate limits on the public endpoint are artifically high.
    
    This PR adds a Redis-based rate limiter to fix this problem. While our current rate limiting library (github.com/sethvargo/go-limiter) _does_ support Redis, the client library it uses is not type safe, is less performant, and would require us to update the other places we use Redis. To avoid these issues, I created a simple rate limiting interface with both Redis and memory backend.
    
    Note that this PR only adds the new implementations - it does not integrate them with the rest of the codebase. I'll do that in a separate PR to make review easier.
    c2b8efac
Name
Last commit
Last update
..
cmd/proxyd Loading commit data...
integration_tests Loading commit data...
.gitignore Loading commit data...
CHANGELOG.md Loading commit data...
Dockerfile Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
backend.go Loading commit data...
backend_rate_limiter.go Loading commit data...
cache.go Loading commit data...
cache_test.go Loading commit data...
config.go Loading commit data...
entrypoint.sh Loading commit data...
errors.go Loading commit data...
example.config.toml Loading commit data...
frontend_rate_limiter.go Loading commit data...
frontend_rate_limiter_test.go Loading commit data...
go.mod Loading commit data...
go.sum Loading commit data...
lvc.go Loading commit data...
methods.go Loading commit data...
metrics.go Loading commit data...
package.json Loading commit data...
proxyd.go Loading commit data...
rpc.go Loading commit data...
rpc_test.go Loading commit data...
server.go Loading commit data...
string_set.go Loading commit data...
tls.go Loading commit data...