Consul Load-Balancing made simple

Release License MIT Github Actions Build Status Downloads Docker Pulls fabiolb


Notes

  1. From release 1.5.15 onward, fabio changes the default GOGC from 800 back to the golang default of 100. Apparently this made some sense back in the golang 1.5 days, but with changes introduced with golang 1.12 and others, this is probably no longer a very good default. This is still configurable, as always, but the new default should make the most sense for most users.

  2. From release 1.5.14, release hashes are signed with a new PGP key. See details here.

  3. From release 1.5.14 onward, fabio binary releases are compiled with golang 1.15+.
    This means that the fabio will no longer validate upstream https certificates that do not have SAN extensions matching the server name. This may be a concern if fabio is communicating with https backends with misconfigured certificates. If this is a problem, you can specify tlsskipverify=true on the route.


fabio is a fast, modern, zero-conf load balancing HTTP(S) and TCP router for deploying applications managed by consul.

Register your services in consul, provide a health check and fabio will start routing traffic to them. No configuration required. Deployment, upgrading and refactoring has never been easier.

fabio is developed and maintained by The Fabio Authors.

It powers some of the largest websites in Australia (gumtree.com.au) and Italy (www.kijiji.it). It delivers 23.000 req/sec every day since Sep 2015 without problems.

It integrates with Consul, Vault, Amazon ELB, Amazon API Gateway and more.

It supports (Full feature list)

Watch Kelsey Hightower demo Consul, Nomad, Vault and fabio at HashiConf EU 2016.

The full documentation is on fabiolb.net

Getting started

  1. Install from source, binary, Docker or Homebrew.

    # go 1.15 or higher is required
    go get github.com/fabiolb/fabio                     (>= go1.15)
    
    brew install fabio                                  (OSX/macOS stable)
    brew install --devel fabio                          (OSX/macOS devel)
    
    docker pull fabiolb/fabio                           (Docker)
    
    https://github.com/fabiolb/fabio/releases           (pre-built binaries)
  2. Register your service in consul.

    Make sure that each instance registers with a unique ServiceID and a service name without spaces.

  3. Register a health check in consul as described here.

    By default fabio only watches services which have a passing health check, unless overridden with registry.consul.service.status.

  4. Register one urlprefix- tag per host/path prefix it serves, e.g.:

# HTTP/S examples
urlprefix-/css                                     # path route
urlprefix-i.com/static                             # host specific path route
urlprefix-mysite.com/                              # host specific catch all route
urlprefix-/foo/bar strip=/foo                      # path stripping (forward '/bar' to upstream)
urlprefix-/foo/bar proto=https                     # HTTPS upstream
urlprefix-/foo/bar proto=https tlsskipverify=true  # HTTPS upstream and self-signed cert

# TCP examples
urlprefix-:3306 proto=tcp                          # route external port 3306

Make sure the prefix for HTTP routes contains at least one slash (/).

See the full list of options in the Documentation.

  1. Start fabio without a config file (assuming a running consul agent on localhost:8500) Watch the log output how fabio picks up the route to your service. Try starting/stopping your service to see how the routing table changes instantly.

  2. Send all your HTTP traffic to fabio on port 9999. For TCP proxying see TCP proxy.

  3. Done

Author and Founder

Maintainers

Contributors

This project exists thanks to all the people who contribute. [Contribute].

License

  • Contributions up to 14 Apr 2017 before 38f73da

    MIT Licensed Copyright (c) 2017 eBay Software Foundation. All rights reserved.

  • Contributions after 14 Apr 2017 starting with 38f73da

    MIT Licensed Copyright (c) 2017-2019 Frank Schroeder. All rights reserved.

  • Contributions after 22 Jan 2020 starting with 9da7b1b

    MIT Licensed Copyright (c) 2020 Education Networks of America. All rights reserved.

See LICENSE for details.

Stargazers over Time

Stargazers over time

Owner
Comments
  • Draft: WAF

    Draft: WAF

    Closes !911

    • i have not updated the vendor to keep the PR light (go mod tidy && go mod vendor)
    • there is a setup.sh script in waf folder to download the CRS (one rule is disabled) (cd waf && bash setup.sh)
    • to enable the WAF edit coraza.conf line 7 from SecRuleEngine DetectionOnly to SecRuleEngine On

    at the moment v2 version of coraza is being used as v3 is still in alpha

    curl http://localhost:9999/?a=<script>alert(1)</script> will trigger the waf

  • Handle case where grpc backend may be deregistered from registry but is still handling traffic

    Handle case where grpc backend may be deregistered from registry but is still handling traffic

    This is an attempt to gracefully shut down a connection to a grpc backend that gets deregistered from a registry, such as consul. This is described as point 1 in #807 . I'm not sure how common this will be, mostly a deregister event is caused by a failing health check, but this is easy enough to implement and shouldn't break anything so worth trying

  • WAF integration

    WAF integration

    it could be interesting to integrate coraza (https://github.com/corazawaf/coraza) directly in fabio?

    before starting the implementation I would like some feedback

  • feat: Compatibility with vault-acme (fixes #900)

    feat: Compatibility with vault-acme (fixes #900)

    First approach to making issuing of certificates compatible with the way vault-acme works. Essentially, just allow to also load certificates from cert instead of certificate.

    Since i am a Go novice, please let me know if there is a cleaner approach to this.

    Also, am I supposed to direct PRs to master?

  • Compatibility with acme-vault

    Compatibility with acme-vault

    As per https://github.com/remilapeyre/vault-acme/issues/34, I would like to use fabio and acme-vault together to deal with letsencrypt certificates for loadbalancing and have vault deal with the certs through pki (e.g. acme-vault plugin).

    However, the keys are different for when issuing certs. While this one is probably easy to get compatibility with, I wonder what is required to get these two wonderful projects talk more nicely with each other.

    After all, I wonder how many people's needs this would satisfy.

    Cheers, -- Fabian

Simple Nginx Load Balancing Use Docker Engine
Simple Nginx Load Balancing Use Docker Engine

Load Balancing Menggunakan Nginx Load Balancing adalah sebuah mekanisme untuk membagi atau mendistribusikan trafik ke beberapa server. Nginx selain be

Dec 14, 2021
Seesaw v2 is a Linux Virtual Server (LVS) based load balancing platform.

Seesaw v2 Note: This is not an official Google product. About Seesaw v2 is a Linux Virtual Server (LVS) based load balancing platform. It is capable o

Jan 3, 2023
Client-Side Load Balancing for Golang

cslb Client-Side Load Balancer This Project is in early developing state Feature Multiple client-side load balancing solutions support Round-Robin DNS

Aug 29, 2022
DNS/DoT to DoH proxy with load-balancing, fail-over and SSL certificate management

dns-proxy Configuration Variable Example Description TLS_DOMAIN my.duckdns.org Domain name without wildcards. Used to create wildcard certificate and

Oct 26, 2022
Serve endpoint metadata for client side load balancing

Servok Servok is a service that provides endpoint metadata for client side load balancing. See CONTRIBUTING.md for instructions on how to contribute a

Dec 9, 2021
Laptop Booking Application in Golang and gRPC, load-balancing with NGINX, and fully compatible with HTTPS OpenAPI v3

Laptop Booking Application in Golang and gRPC Goals GitHub CI & Coverage Badge Serialize protobuf messages Create laptop unary gRPC Search laptop Serv

Jun 17, 2022
A Load-balancer made from steel
A Load-balancer made from steel

slb The Steel Load Balancer A load-balancer forged in the fires of Sheffield Getting slb Prebuilt binaries for armv7 and amd64 exist in the releases p

Nov 13, 2022
Use Consul to do service discovery, use gRPC +kafka to do message produce and consume. Use redis to store result.
Use  Consul to do service discovery, use gRPC +kafka to do message produce and consume. Use redis to store result.

目录 gRPC/consul/kafka简介 gRPC+kafka的Demo gRPC+kafka整体示意图 限流器 基于redis计数器生成唯一ID kafka生产消费 kafka生产消费示意图 本文kafka生产消费过程 基于pprof的性能分析Demo 使用pprof统计CPU/HEAP数据的

Jul 9, 2022
golang consul tools

中文文档 consult A consul key/value tool for golang Usage install go get -u github.com/xxjwxc/consult@master New Config conf := consulkv.NewConfig() With

Mar 6, 2022
Service registration and discovery, support etcd, zookeeper, consul, etc.

discox 支持类型 zookeeper etcd consul 示例 zookeeper server package main import ( "fmt" "github.com/goeasya/discox" "os" ) func main() { cfg := discox

Aug 31, 2022
Check DNS and optionally Consul and serve the status from a Web page

dns-checker Table of contents Preamble Compiling the program Keepalived and LVS Available options Setting up systemd Preamble This application checks

Nov 7, 2021
Kong and Consul Lab For Golang

Kong and Consul Lab Prerequisites docker Deploy Consul Server docker run -d -p 8500:8500 -p 8600:8600/udp --name=consul-server consul agent -server -u

Nov 25, 2021
Consul K/V Store Implementation For Go
Consul K/V Store Implementation For Go

Consul K/V Store Implementation For Go Enables Consul to be used as a configuration source in go applications Dynamic Configuration with Consul's Key/

Jun 7, 2022
Golang Super Simple Load Balance

SSLB (Super Simple Load Balancer) ver 0.1.0 It's a Super Simple Load Balancer, just a little project to achieve some kind of performance. Features Hig

Dec 18, 2022
Simple, fast and scalable golang rpc library for high load

gorpc Simple, fast and scalable golang RPC library for high load and microservices. Gorpc provides the following features useful for highly loaded pro

Dec 19, 2022
Simple Reverse Proxy Load Balancer

lb - a reverse proxy load-balancing server, It implements the Weighted Round Robin Balancing algorithm

Mar 23, 2022
Simple load-balancer for npchat servers, based on the xor distance metric between node & user id

npchat-helmsman Simple load-balancer for npchat servers, based on the xor distance metric between node & user id. Local Development Clone this reposit

Jan 15, 2022
A very simple rate limiter in go, made as a learning project to learn go and rate limiting patterns!
A very simple rate limiter in go, made as a learning project to learn go and rate limiting patterns!

rate-limiter-go A very simple rate limiter in go, made as a learning project to learn go and rate limiting patterns! Demo: Running the project: To exe

Jun 1, 2022
GoScan is a port-scanner made entirely in Go-lang. The purpose of the tool is to be fast, dynamic and simple so that a professional in the CyberSecurity area can make an optimized list of ports
GoScan is a port-scanner made entirely in Go-lang. The purpose of the tool is to be fast, dynamic and simple so that a professional in the CyberSecurity area can make an optimized list of ports

?? GoScan GoScan is a port-scanner made entirely in Go-lang. The purpose of the tool is to be fast, dynamic and simple so that a professional in the C

Jul 19, 2022