gobetween - modern & minimalistic proxy server for the ☁️ Cloud era.
Current status: Under active development. Currently in use in several highy loaded production environments.
-
Clear & Flexible Configuration with TOML or JSON
- File - read configuration from the file
- URL - query URL by HTTP and get configuration from the response body
- Consul - query Consul key-value storage API for configuration
-
[Management REST API] (https://github.com/yyyar/gobetween/wiki/REST-API)
- System Information - general server info
- Configuration - dump current config
- Servers - list, create & delete
- Stats & Metrics - for servers and backends including rx/tx, status, active connections & etc.
-
- Static - hardcode backends list in config file
- Docker - query backends from Docker / Swarm API filtered by label
- Exec - execte arbitrary program and get backends from it's stdout
- JSON - query arbitrary http url and pick backends from response json (of any structure)
- Plaintext - query arbitrary http and parse backends from response text with customized regexp
- SRV - query DNS server and get backends from SRV records
- Consul - query Consul Services API for backends
-
- Ping - simple TCP ping healtcheck
- Exec - execute arbitrary program passing host & port as options, and read healtcheck status from the stdout
-
- Weight - select backend from pool based relative weights of backends
- Roundrobin - simple elect backend from pool in circular order
- Iphash - route client to the same backend based on client ip hash
- Leastconn - select backend with least active connections
- Leastbandwidth - select backends with least bandwidth
-
Integrates seamlessly with Docker and with any custom system (thanks to Exec discovery and healtchecks)
-
Single binary distribution
- Download and Install
- Read Configuration Reference
- Execute
gobetween --help
for full help on all available commands and options.
- Install Go 1.6+ https://golang.org/
$ git clone git@github.com:yyyar/gobetween.git
$ make deps
$ make run
Run several web servers for tests in different terminals:
$ python -m SimpleHTTPServer 8000
$ python -m SimpleHTTPServer 8001
Put localhost:8000
and localhost:8001
to static_list of static discovery in config file, then try it:
-
$ gobetween -c gobetween.toml
-
$ curl http://localhost:3000
It's Fast! See Performance Testing
It's play on words: gobetween ("go between").
Also, it's written in Go, and it's a proxy so it's something that stays between 2 parties 😄
MIT. See LICENSE file for more details.
Logo by Max Demchenko