!! This is a work-in-progress repo !!
GoSLB is multi-site DNS load-balancer with a RESTful API and etcd backend. The basic configuration unit is a service (DNS domain) with a list of endpoints (IP addresses) and a TCP or a HTTP health monitor. Each endpoint can be assigned to a site (datacenter, cloud region, ...) and, based on provided site's IP ranges, local-site endpoints are preferred in the DNS responses to clients.
To get a demo instance running quickly, have a look at the simple docker example.
Algorithm that chooses the list of endpoints to return to the client is based on enabled/disabled state, priority, health (as reported by monitor) and site affiliation:
- Only enabled healthy endpoints are considered
- If there are enabled & healthy endpoints with different priorities, only the highest priority ones are considered
- If there are highest-priority endpoints in multiple sites, one of them being the client's local site, only local site endpoints are returned, otherwise all sites' endpoints are returned
- The endpoints are returned in random order (if there are more than 3 candidates, random 3 are returned)
TODO
For full API reference see: https://goslb.docs.apiary.io/