fabio

command module
v1.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2017 License: MIT Imports: 29 Imported by: 0

README

Current stable version: 1.4.4

Build Status License MIT Downloads Docker Pulls

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 Frank Schroeder.

It powers some of the largest websites in The Netherlands (marktplaats.nl), 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 the Wiki.

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

    # go 1.8 or higher is required
    go get github.com/fabiolb/fabio                     (>= go1.8)
    
    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.

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

    Make sure the health check is passing since fabio will only watch services which have a passing health check.

  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

Maintainers 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 Frank Schroeder. All rights reserved.

See LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
Package api provides the HTTP api.
Package api provides the HTTP api.
ui
Package assert provides a simple assert framework.
Package assert provides a simple assert framework.
demo
server
Package server provides a sample HTTP/Websocket server which registers itself in consul using one or more url prefixes to demonstrate and test the automatic fabio routing table update.
Package server provides a sample HTTP/Websocket server which registers itself in consul using one or more url prefixes to demonstrate and test the automatic fabio routing table update.
wsclient
Package wsclient implements a simple web socket client which reads lines from stdin and sends them to the websocket url.
Package wsclient implements a simple web socket client which reads lines from stdin and sends them to the websocket url.
Package exit allows to register callbacks which are called on program exit.
Package exit allows to register callbacks which are called on program exit.
Package logger implements a configurable access logger.
Package logger implements a configurable access logger.
Package metrics provides functions for collecting and managing metrics through different metrics libraries.
Package metrics provides functions for collecting and managing metrics through different metrics libraries.
gzip
Package gzip provides an HTTP handler which compresses responses if the client supports this, the response is compressable and not already compressed.
Package gzip provides an HTTP handler which compresses responses if the client supports this, the response is compressable and not already compressed.
tcp
file
Package file implements a simple file based registry backend which reads the routes from a file once.
Package file implements a simple file based registry backend which reads the routes from a file once.
static
Package static implements a simple static registry backend which uses statically configured routes.
Package static implements a simple static registry backend which uses statically configured routes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL