Skip to content
forked from yyyar/gobetween

☁️ Modern & minimalistic load balancer for the Сloud era

License

Notifications You must be signed in to change notification settings

geunho/gobetween

Repository files navigation

gobetween

Tag Build Status Go Report Card Docs Docker License Gitter

gobetween - modern & minimalistic proxy server for the ☁️ Cloud era.

Current status: Under active development. Currently in use in several highy loaded production environments.

Features

  • TCP Load Balancing

  • Clear Configuration with TOML or JSON

    • File
    • URL
    • Consul Key-Value
  • [Management REST API] (https://github.com/yyyar/gobetween/wiki/REST-API)

    • System Information
    • Configuration Dump
    • Servers List / Create / Delete
    • Servers and Backends rx/tx, Status, Active Connections, etc.
  • Discovery

    • 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
  • Healthchecks

    • Ping - simple TCP ping healtcheck
    • Exec - execute arbitrary program passing host & port as options, and read healtcheck status from the stdout
  • Balancing Strategies

    • Iphash
    • Leastconn
    • Roundrobin
    • Weight
  • Integrates seamlessly with Docker and with any custom system (thanks to Exec discovery and healtchecks)

  • Single binary distribution

Architecture

gobetween

Usage

Hacking

Debug and Test

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

Performance

See Performance Testing.

The Name

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 😄

License

MIT. See LICENSE file for more details.

Authors & Contributors

Logo

Logo by Max Demchenko

About

☁️ Modern & minimalistic load balancer for the Сloud era

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 96.1%
  • Makefile 2.3%
  • Shell 1.6%