Consul Load-Balancing made simple

Overview

Release License MIT Travis CI 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

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

    opened by ennetech 2
  • 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

    opened by nathanejohnson 0
  • 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

    enhancement 
    opened by ennetech 4
  • add feature to advertise anycast addresses via BGP

    add feature to advertise anycast addresses via BGP

    add gobgp dependency

    ensure that we ignore advertisements from bgp peers

    add option to pass gobgpd config file, which helped figure out how to actually configure gobgpd to block peers from publishing routes into our routing table.

    install gobgpd and gobgp during github action tests

    update Makefile github target

    adding bgp documentation

    opened by nathanejohnson 0
  • 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?

    opened by xeroc 1
Releases(v1.6.2)
Owner
fabio
The Consul Load-Balancer
fabio
WriteFreely is a clean, minimalist publishing platform made for writers

WriteFreely is a clean, minimalist publishing platform made for writers. Start a blog, share knowledge within your organization, or build a community

WriteFreely 3k Nov 23, 2022
Azanul Haque 7 Oct 1, 2021
Simple Bank is a simple REST API that allows users to perform transferences with each other.

Simple Bank is a simple REST API that allows users to perform transferences with each other. ?? Technologies Golang Docker PostgreSQ

Matheus Mosca 12 Feb 15, 2022
goof is a woof written in go - share files via a simple httpd

#goof - share files through HTTP protocol goof (Go Offer One File) is a very simple tool to send and receive files on your local LAN. Features include

Fredrik Steen 14 Oct 4, 2022
Simple bookmark manager built with Go

Shiori This project is now maintained by Dean Jackson (@deanishe). The awesome original author, @RadhiFadlillah, unfortunately no longer has the time

Shiori 6.7k Nov 26, 2022
Beautifully simple single author blog in Go - derived from Bear Blog.

Polar Bear Blog ??‍❄️ Lightweight blogging system for a single author. Written in Go and deploys to your own GCP project with a few commands. It's a d

Joseph Spurrier 83 Nov 27, 2022
Remark42 is a self-hosted, lightweight, and simple comment engine

Remark42 is a self-hosted, lightweight, and simple (yet functional) comment engine, which doesn't spy on users. It can be embedded into blogs, articles or any other place where readers add comments.

Umputun 4k Nov 28, 2022
The cider is a simple tool of building GitHub pages. It's fast and easy to use.

The cider is a simple tool of building GitHub pages. It's fast and easy to use. See example: https://www.leyafo.com Install Compiling from source code

李亚夫 49 Feb 13, 2022
Analytics box a simple and privacy focused analytics tool written in go like google analytics

Analytics box is analytics tool like google analytics but instead of ripping user's privacy off them like google it respects their privacy and doesn't collect any unnecessary information.

Ketan Iralepatil 26 Nov 27, 2022
A simple and privacy focused analytics tool written in go.

Analytics Box Hello guys, this is privacy friendly analytics tool, Analytics Box for web written in go. It ensures user privacy but at the same time a

Ketan Iralepatil 26 Nov 27, 2022
A simple application lifecycle management tool with multiple servers.

A simple application lifecycle management tool with multiple servers.

Wimi Yuan 4 Aug 13, 2022
Very simple REST server written in Go.

Simple Web API written in Go For practice and learning sake. .env is a dummy file with no real credentials. Endpoints GET /books - get all books; GET

null 1 Oct 18, 2021
Simple vanilla Go CRUD application with mongoDB database with its mflix dataset that I use for my thesis about benchmarking REST API and GraphQL.

Go GraphQL Simple vanilla Go CRUD application with mongoDB database with its mflix dataset that I use for my thesis about benchmarking REST API and Gr

Adrian Edy Pratama 0 Oct 15, 2021
A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

Nitin Narayanan 1 Oct 10, 2021
Go Getting Started from PluralSight. Simple webapp in golang

Go_WEB_APP Go Getting Started from PluralSight. Simple webapp in golang This is simple Webapp in GO, which has users api to interact with backend This

Manish Taori 0 Oct 18, 2021
Simple web app using Go and Gin framework

go-gin-app Simple web app using Go and Gin framework Golang 과 Gin 프레임워크를 사용한 간단한 웹 앱 How to get Started Install Gin and have Go installed on your syst

Sean Hong(홍성민) 0 Oct 18, 2021
Golang beego framework based personal simple blog system

goblog 基于Golang的个人简易博客系统 [TOC] goblog介绍 goblog基于go语言开发的一个简约版个人博客系统,基于Golang语言编写,后端基于了Beego的web框架,目前具备博文系统最基础的功能模块.基本上是一个拿来即用的个人博文平台,只需要部署一个mysql数据存储服务

Mr.Qin 2 Nov 9, 2021
This is a very simple web-app which simply always returns HTTP status code 200

Responder This is a very simple web-app which simply always returns HTTP status code 200. It will also wait for an amount of time which can be set in

Jacob Palecek 1 Dec 14, 2021
A simple web application written in Golang which listens on port 8080

GoWebApp It's a simple web application written in Golang which listens on port 8080 Building It can be build using the command go build -o metricsweba

Viral Kamdar 0 Oct 21, 2021