https://github.com/ojford/ipvs-txt-lb
IPVS load balancer sourcing servers from a TXT record
https://github.com/ojford/ipvs-txt-lb
dns-record ipvs ipvsadm load-balancer
Last synced: about 1 year ago
JSON representation
IPVS load balancer sourcing servers from a TXT record
- Host: GitHub
- URL: https://github.com/ojford/ipvs-txt-lb
- Owner: OJFord
- License: mit
- Created: 2019-09-09T18:07:49.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-09T19:09:36.000Z (almost 7 years ago)
- Last Synced: 2025-03-19T01:45:31.754Z (over 1 year ago)
- Topics: dns-record, ipvs, ipvsadm, load-balancer
- Language: Shell
- Size: 4.88 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IPVS-TXT-LB
## What?
Create an [IPVS](https://en.wikipedia.org/wiki/IP_Virtual_Server) Load Balancer from a list of 'real servers' in a TXT record.
## Why?
My initial motivation is for a Kubernetes control plane - and not use an external load balancer for the API servers, which means they can stay behind a firewall and not on the public internet, and no separate load balancing server is required; they just need to be able to make a DNS query to obtain a list of peers (to whom they already have access over a private network).
In general, this could be useful in any case where:
* you have a set of machines on a common network
* each machine needs to talk to one of the others, but it doesn't matter which
* you don't want a separate load balancer
* you can query a DNS record from the machines, and keep it up to date with the machine list from outside (e.g. CI/CD)
## How?
1. Install `ipvsadm`
1. Put `ipvs-txt-lb` somewhere that's in `$PATH`
1. Put `ipvs-txt-lb.service` in `/etc/systemd/system/` and run `systemctl enable ipvs-txt-lb`
1. Put `ipvs-txt-lb.conf` in `/etc/` and populate it
1. Populate your `TXT` record with a `;`-delimited list of servers, e.g. `alpha;beta`
1. Run `systemctl start ipvs-txt-lb`