Configs2026年7月16日·1 分钟阅读

Fabio — Zero-Config HTTP Load Balancer for Consul

A fast, zero-configuration HTTP/TCP load balancer written in Go that uses Consul service discovery to automatically route traffic to healthy backends.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Fabio
直接安装命令
npx -y tokrepo@latest install fb21db6c-8155-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Fabio is a fast, zero-configuration HTTP and TCP load balancer written in Go. It integrates natively with HashiCorp Consul for service discovery and automatically builds its routing table from Consul service tags, eliminating the need for manual configuration files or reloads.

What Fabio Does

  • Routes HTTP and TCP traffic to backends registered in Consul
  • Builds and updates routing tables automatically from Consul service tags
  • Supports path-based, host-based, and weighted routing rules
  • Terminates TLS with automatic certificate management via Consul or Vault
  • Provides a real-time web UI showing the current routing table

Architecture Overview

Fabio watches the Consul service catalog for changes and rebuilds its routing table whenever services register or deregister. Each service announces its routes through Consul tags using a simple urlprefix- convention. Incoming requests are matched against the routing table and proxied to healthy backends. Health checks are delegated to Consul, keeping Fabio stateless and simple.

Self-Hosting & Configuration

  • Download a single binary or install via go install
  • Ensure Consul is running and accessible on the default address
  • Register services with urlprefix- tags to define routing rules
  • Configure TLS termination by pointing to certificate sources in Consul KV or Vault
  • Customize behavior through environment variables or a properties file

Key Features

  • True zero-configuration setup when paired with Consul
  • Automatic routing table updates with no restarts or reloads
  • Path-based and host-based routing with glob pattern support
  • Built-in web UI for monitoring active routes and traffic metrics
  • Single static binary with no external dependencies beyond Consul

Comparison with Similar Tools

  • Traefik — supports many service discovery backends; Fabio is purpose-built for Consul with simpler configuration
  • HAProxy — requires config file updates and reloads; Fabio updates routes dynamically from Consul
  • Nginx — general-purpose web server requiring config management; Fabio is a focused load balancer
  • Envoy — feature-rich L7 proxy with complex config; Fabio trades features for zero-config simplicity

FAQ

Q: Does Fabio require a configuration file? A: No. Fabio reads all routing information from Consul service tags. Optional settings can be passed via environment variables or a properties file.

Q: How are routes defined? A: Services register in Consul with tags like urlprefix-/api or urlprefix-mysite.com/. Fabio watches for these tags and routes traffic accordingly.

Q: Does it support WebSocket connections? A: Yes, Fabio supports WebSocket proxying for services registered with appropriate route tags.

Q: Can I use Fabio without Consul? A: Consul is the primary service discovery backend. For environments without Consul, static routes can be configured, but dynamic discovery requires Consul.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产