Coder Social home page Coder Social logo

gtotoy / gobetween Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yyyar/gobetween

0.0 2.0 0.0 238 KB

:cloud: Modern & minimalistic load balancer for the Сloud era

Home Page: http://gobetween.io

License: Other

Makefile 2.27% Shell 1.58% Go 96.15%

gobetween's Introduction

gobetween

Tag Build Status Go Report Card Docs Docker License Donate with Bitcoin

gobetween - modern & minimalistic load balancer and reverse-proxy for the ☁️ Cloud era.

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

Features

  • Fast L4 Load Balancing

  • 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

    • 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.
  • 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
    • Consul - query Consul Services API for backends
    • LXD - query backands from LXD
  • Healthchecks

    • Ping - simple TCP ping healtcheck
    • Exec - execute arbitrary program passing host & port as options, and read healtcheck status from the stdout
  • 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
    • 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 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

It's Fast! 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 & Maintainers

All Contributors

Logo

Logo by Max Demchenko

gobetween's People

Contributors

yyyar avatar illarion avatar kikom avatar jtopjian avatar nickdoikov avatar shantanugadgil avatar ctrlok avatar

Watchers

James Cloos avatar Gustavo Totoy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.