Description
All you need to load balance in the Cloud era! Features: - L4 TCP Load Balancing - Single binary distribution - Clear Configuration with TOML or JSON (from file, url or consul) - REST API (system info, servers, stats & metrics) - Discovery (static, docker, custom exec, json, regexp, dns srv, consul & more...) - Healthchecks (ping & custom) - Balancing Strategies (weight, roundrobin, leastconn, iphash) - Integrates seamlessly with Docker and with any custom system (thanks to Exec discovery and healtchecks)
gobetween alternatives and similar packages
Based on the "Networking" category.
Alternatively, view gobetween alternatives based on common mentions on social networks and blogs.
-
fasthttp
Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http -
Netmaker
Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks. -
gnet
🚀 gnet is a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go. -
mqttPaho
The Paho Go Client provides an MQTT client library for connection to MQTT brokers via TCP, TLS or WebSockets. -
fortio
Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats. -
nbio
Pure Go 1000k+ connections solution, support tls/http1.x/websocket and basically compatible with net/http, with high-performance and low memory cost, non-blocking, event-driven, easy-to-use. -
gev
🚀Gev is a lightweight, fast non-blocking TCP network library / websocket server based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers. -
gmqtt
Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.x and V5 in golang -
easytcp
:sparkles: :rocket: EasyTCP is a light-weight TCP framework written in Go (Golang), built with message router. EasyTCP helps you build a TCP server easily fast and less painful. -
peerdiscovery
Pure-Go library for cross-platform local peer discovery using UDP multicast :woman: :repeat: :woman: -
raw
DISCONTINUED. Package raw enables reading and writing data at the device driver level for a network interface. MIT Licensed. -
ethernet
Package ethernet implements marshaling and unmarshaling of IEEE 802.3 Ethernet II frames and IEEE 802.1Q VLAN tags. MIT Licensed. -
buffstreams
A library to simplify writing applications using TCP sockets to stream protobuff messages
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of gobetween or a related project?
Popular Comparisons
README
gobetween - modern & minimalistic load balancer and reverse-proxy for the :cloud: Cloud era.
Current status: Maintenance mode, accepting PRs. Currently in use in several highly loaded production environments.
Features
-
- TCP - with optional The PROXY Protocol support
- TLS - TLS Termination + ACME & TLS Proxy
- UDP - with optional virtual sessions and transparent mode
Clear & Flexible Configuration with [TOML](config/gobetween.toml) or [JSON](config/gobetween.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
-
- 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 the config file
- Docker - query backends from Docker / Swarm API filtered by label
- Exec - execute an arbitrary program and get backends from its 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
- LXD - query backends from LXD
-
- Ping - simple TCP ping healthcheck
- Exec - execute arbitrary program passing host & port as options, and read healthcheck status from the stdout
- Probe - send specific bytes to backend (udp, tcp or tls) and expect a correct answer (bytes or regexp)
Balancing Strategies (with SNI support)
- 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
- Iphash1 - same as iphash but backend removal consistent (clients remain connecting to the same backend, even if some other backends down)
- Leastconn - select backend with least active connections
- Leastbandwidth - backends with least bandwidth
Integrates seamlessly with Docker and with any custom system (thanks to Exec discovery and healthchecks)
Single binary distribution
Architecture
Usage
- Install with snap: https://snapcraft.io/gobetween
- Other Installation Options
- Read Configuration Reference
- Execute
gobetween --help
for full help on all available commands and options.
Hacking
- Install Go 1.14+ https://golang.org/
$ git clone [email protected]:yyyar/gobetween.git
$ make
$ make run
Debug and Test
Run several web servers for tests in different terminals:
$ python -m SimpleHTTPServer 8000
$ python -m SimpleHTTPServer 8001
Instead of Python's internal HTTP module, you can also use a single binary (Go based) webserver like: https://github.com/udhos/gowebhello
gowebhello has support for SSL sertificates as well (HTTPS mode), in case you want to do quick demos of the TLS+SNI capabilities of gobetween.
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
Enable profiler and debug issues you encounter
[profiler]
enabled = true # false | true
bind = ":6060" # "host:port"
Performance
It's Fast! See Performance Testing
The Name
It's a 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 :smile:
License
MIT. See LICENSE file for more details.
Authors & Maintainers
All Contributors
- See [AUTHORS](AUTHORS)
Community
- Join gobetween Telegram group here.
Logo
Logo by Max Demchenko
*Note that all licence references and agreements mentioned in the gobetween README section above
are relevant to that project's source code only.