Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for starting the server on a unix domain sockets #542

Merged
merged 2 commits into from
Apr 13, 2024

Conversation

healthwaite
Copy link
Contributor

Some folks may want the ability to start the rate limiter on a unix domain socket rather than a TCP/IP endpoint. This PR adds support for that.

  • introduce a new environment variable GRPC_UDS
  • if this variable is set we'll attempt to start the gRPC server on the unix domain socket address specified, otherwise we'll default to starting on GRPC_HOST:GRPC_PORT.

Example startup logs:

time="2024-03-20T11:10:23Z" level=info msg="Tracing disabled"
time="2024-03-20T11:10:23Z" level=warning msg="connecting to redis on redis-cluster-headless:6379 with pool size 10"
time="2024-03-20T11:10:23Z" level=warning msg="Creating cluster with urls [redis-cluster-headless:6379]"
time="2024-03-20T11:10:23Z" level=info msg="Waiting for initial ratelimit config update event"
time="2024-03-20T11:10:23Z" level=info msg="Successfully loaded new configuration"
time="2024-03-20T11:10:23Z" level=info msg="Successfully loaded the initial ratelimit configs"
time="2024-03-20T11:10:23Z" level=warning msg="Listening for HTTP on '0.0.0.0:8080'"
time="2024-03-20T11:10:23Z" level=warning msg="Listening for gRPC on '/tmp/grpc.sock'"
time="2024-03-20T11:10:23Z" level=warning msg="Listening for debug on '0.0.0.0:6070'"

I didn't see an obvious place to extend the unit tests.

@healthwaite
Copy link
Contributor Author

@envoyproxy/ratelimit-maintainers

@ysawa0
Copy link
Member

ysawa0 commented Mar 29, 2024

@healthwaite can you add how to use this to the documentation

@healthwaite
Copy link
Contributor Author

@healthwaite can you add how to use this to the documentation

Sure - done

@healthwaite
Copy link
Contributor Author

I've rebased and force pushed because I forgot to add a signature to my commits

@ysawa0 ysawa0 merged commit b68fb90 into envoyproxy:main Apr 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants