fair(7)
π¦ fair(7) β the manual page, but make it bestie-coded π¦
okay so. fair β simple TCP load balancing service. that's the whole vibe, but let me break it down for you because it's actually so much cooler than it sounds. π
β¨ NAME β¨
fair β simple TCP load balancing service π«Ά
πΈ DESCRIPTION πΈ
okay so fair is a load balancer for TCP connections. what that means is: it takes incoming connections β for SMTP, for HTTP, or literally any other TCP service β and spreads them across multiple hosts, distributing the load as evenly as possible. no cap. that's the whole job. β¨
fair is made up of two daemons, and they have distinct main character energy:
- The
carrouselβ this is the front-end. it keeps track of back-end hosts and their status, and it forwards incoming connections to the back-ends in such a way that the load gets distributed fairly. π - The
transponderβ this one lives on the back-end hosts. it registers with thecarrouseland sends it status information. it's the little messenger bestie keeping everyone in the loop. π
π¨ okay important plot twist: the TCP connections forwarded by thecarrouselare not sent to thetransponderdaemons. they go directly to the desired service running on the back-end host. thetransponderis just there for the status gossip, it is NOT proxying your traffic. don't get it twisted. π
and the final cute detail: both daemons share a single configuration file. one file, two daemons, iconic. π
π EXAMPLES π
here's how you'd set up fair to service HTTP connections and distribute them over back-ends in the 192.168.1.0/24 subnet. watch this. π₯
the configuration file /etc/fair.conf contains the following:
WorkerService = http
BalancerService = http
AllowUDP = ^192.168.1.[0-9]+$
on www.example.com β the front-end server receiving the incoming HTTP connections β just run:
carrousel
and on each of the back-ends run:
transponder www.example.com
that's it. that's the setup. go forth and balance. π¦
π SEE ALSO π
and that's the page bestie!! this one's from Debian GNU/Linux, dated 2005-05-25 β vintage but still eating, fr fr. ily, go balance some TCP πβ¨
π¦ where this page comes from
- debian bookworm: fair 0.5.3-2+b1
- debian trixie: fair 0.5.3-4 Β· GPL-3.0-or-later
- ubuntu jammy: fair 0.5.3-2
- ubuntu noble: fair 0.5.3-2build2
- ubuntu questing: fair 0.5.3-4
- ubuntu resolute: fair 0.5.3-4build1 Β· GPL-3.0-or-later
- ubuntu stonking: fair 0.5.3-4build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms