infra/proxyd/proxyd
github-actions[bot] 09552fddea Version Packages
2022-09-29 01:37:00 +00:00
..
cmd/proxyd maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
integration_tests proxyd: Add batch size metric and configurable max (#3545) 2022-09-23 15:06:02 -06:00
.gitignore maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
backend.go proxyd: Fix error message in tests (#3503) 2022-09-19 16:44:08 +00:00
cache_test.go maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
cache.go maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
CHANGELOG.md Version Packages 2022-09-29 01:37:00 +00:00
config.go proxyd: Add batch size metric and configurable max (#3545) 2022-09-23 15:06:02 -06:00
Dockerfile maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
entrypoint.sh maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
errors.go Last unwrapped errors 2022-09-09 04:56:59 -07:00
example.config.toml maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
go.mod proxyd: Add frontend rate limiting (#3166) 2022-08-04 11:34:43 -06:00
go.sum proxyd: Add frontend rate limiting (#3166) 2022-08-04 11:34:43 -06:00
lvc.go maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
Makefile maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
methods.go maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
metrics.go proxyd: Add batch size metric and configurable max (#3545) 2022-09-23 15:06:02 -06:00
package.json Version Packages 2022-09-29 01:37:00 +00:00
proxyd.go proxyd: Add batch size metric and configurable max (#3545) 2022-09-23 15:06:02 -06:00
rate_limiter.go proxyd: Add frontend rate limiting (#3166) 2022-08-04 11:34:43 -06:00
README.md maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
rpc_test.go maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
rpc.go style(batch-submitter,bss-core,proxyd): Fix lint Go (#3328) 2022-08-26 19:39:30 -06:00
server.go proxyd: Add batch size metric and configurable max (#3545) 2022-09-23 15:06:02 -06:00
string_set.go maint: Move Go packages into root of repo, adopt go.work (#2524) 2022-05-04 21:51:24 +00:00
tls.go style(batch-submitter,bss-core,proxyd): Fix lint Go (#3328) 2022-08-26 19:39:30 -06:00

rpc-proxy

This tool implements proxyd, an RPC request router and proxy. It does the following things:

  1. Whitelists RPC methods.
  2. Routes RPC methods to groups of backend services.
  3. Automatically retries failed backend requests.
  4. Provides metrics the measure request latency, error rates, and the like.

Usage

Run make proxyd to build the binary. No additional dependencies are necessary.

To configure proxyd for use, you'll need to create a configuration file to define your proxy backends and routing rules. Check out example.config.toml for how to do this alongside a full list of all options with commentary.

Once you have a config file, start the daemon via proxyd <path-to-config>.toml.

Metrics

See metrics.go for a list of all available metrics.

The metrics port is configurable via the metrics.port and metrics.host keys in the config.

Adding Backend SSL Certificates in Docker

The Docker image runs on Alpine Linux. If you get SSL errors when connecting to a backend within Docker, you may need to add additional certificates to Alpine's certificate store. To do this, bind mount the certificate bundle into a file in /usr/local/share/ca-certificates. The entrypoint.sh script will then update the store with whatever is in the ca-certificates directory prior to starting proxyd.