Fabio

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.

Pre-condition

Install Consul

Consul
Install and setup consul

Install

Download Fabio from https://github.com/fabiolb/fabio/releases or can use brew install fabio

Releases · fabiolb/fabio
Consul Load-Balancing made simple. Contribute to fabiolb/fabio development by creating an account on GitHub.

Following guideline to config Consul registered service with correct Tags and pass Health Check https://fabiolb.net/quickstart/

Quickstart
  • Use the tag namming to your service:
urlprefix-/<service-name> strip=/<service-name>

Run Fabio

  • Run CLI
fabio -registry.consul.addr="127.0.0.1:8500" -registry.consul.token="26e3ea3a-81d5-c460-8abb-b74b4874648a"
  • Default fabio will use Consul run on localhost:8500
  • Default fabio will run on localhost:9999 and the UI will run on localhost:9998
  • Use -registry.consul.token to set "Consul ACL Token"

Run Fabio as a Service

  • Use nssm to add Fabioas a Service
NSSM - the Non-Sucking Service Manager