explaingit

fabiolb/fabio

7,333GoAudience · ops devopsComplexity · 4/5Setup · hard

TLDR

A zero-configuration load balancer and HTTP router that reads service tags from Consul automatically and updates routing rules instantly when services start or stop, with no config file required.

Mindmap

mindmap
  root((Fabio))
    What it does
      Zero-config routing
      Load balancing
      Auto-updates from Consul
    Features
      TLS termination
      TCP proxying
      Blue/green traffic split
    Integrations
      Consul service tags
      Prometheus metrics
      HashiCorp Vault
    Deployment
      Binary or Docker
      Homebrew on Mac
      Built-in web UI
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Replace static nginx config files with automatic Consul-tag-based routing that updates without restarting the load balancer

USE CASE 2

Implement blue/green deployments by shifting a percentage of traffic to a new service version using traffic shaping

USE CASE 3

Set up TLS termination and WebSocket proxying for microservices registered in Consul

USE CASE 4

Export routing metrics to Prometheus or DataDog to monitor traffic distribution across healthy service instances

Tech stack

GoConsulDockerPrometheusTLSVault

Getting it running

Difficulty · hard Time to first run · 1h+

Requires a running Consul instance with services registered and health checks configured before fabio can route any traffic.

In plain English

Fabio is a load balancer and HTTP router designed for teams that already use Consul, a service discovery and health-checking tool. The key promise is zero configuration: instead of maintaining routing rules in a config file, fabio reads the service registry in Consul automatically and starts routing traffic to healthy instances. When services start or stop, the routing table updates instantly without restarting fabio. Getting started follows a short sequence: install fabio, register your services in Consul with a health check, and add a special tag to each service entry in the format urlprefix-/your-path. Fabio reads those tags and builds its routing rules from them. HTTP traffic sent to fabio on port 9999 is then distributed to matching services. TCP proxying is also supported through a separate tag format. No external configuration file is needed unless you want to override defaults. Beyond basic routing, fabio supports TLS termination with dynamic certificate stores, raw TCP proxying, WebSocket connections, server-sent events, and traffic shaping for blue/green deployment strategies, where you can shift a portion of traffic to a new service version before switching over fully. Metrics can be exported to Prometheus, Graphite, StatsD, DataDog, or Circonus. A built-in web UI shows the current routing table. The project originated at eBay and has been running in production at gumtree.com.au since September 2015, handling roughly 23,000 requests per second. It also integrates with HashiCorp Vault for secret management and with AWS Elastic Load Balancing and API Gateway. Fabio is available as pre-built binaries, a Docker image, a Homebrew package on macOS, or compiled from Go source. Full documentation is at fabiolb.net.

Copy-paste prompts

Prompt 1
Set up fabio to route HTTP traffic to two Consul-registered services, show me the Consul service tags format and how to verify routing works
Prompt 2
Configure fabio for a blue/green deployment, how do I shift 10% of traffic to a new service version and then roll it to 100%?
Prompt 3
Enable TLS termination in fabio with a dynamic certificate store, what configuration changes are needed?
Prompt 4
Export fabio metrics to Prometheus, what endpoint does fabio expose and how do I configure a Prometheus scrape job for it?
Open on GitHub → Explain another repo

← fabiolb on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.