- Notifications
You must be signed in to change notification settings - Fork8
BalanceD is a Layer-4 Linux Virtual Server (LVS) based load balancing platform for Kubernetes.
License
Demonware/balanced
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
BalanceD is a Layer-4 Linux Virtual Server (LVS) based load balancing platform for Kubernetes.
It is capable of providing basic load balancing for any Kubernetes cluster and is reliable and performant. This is achieved by utilizing LVS (also known as IPVS - IP Virtual Server), along with any Consistent-Hashing algorithm, to implement a stateless Direct-Server-Return (DSR) Layer-4 load balancer. The stateless nature means it can be horizontally scaled with the help of AnyCast and ECMP.
Above all, it is designed with modularity in mind which makes BalanceD very simple to operate and maintain.
BalanceD is meant to be placed alongside an existing Kubernetes networking solution, and isNOT a turnkey solution for Kubernetes networking such askube-router, which was an inspiration for this project.
BalanceD is being used in several production clusters to power the most demanding online game services atDemonware! Core functionality is considered stable.
BalanceD requires two LVS/IPVS nodes at minimum for redundancy purposes - these can either be physical machines or virtual instances. Each node must be part of the Kubernetes cluster and can route to all Pods through their respective Pod IPs.Each node must be configured to act as BGP peers to advertise the VIP addresses to the rest of the network. For flexibility, BalanceD does not bundle a BGP speaker allowing for a more seamless integration with the network. A BIRD configuration is availablehere as a reference.
BalanceD has been tested on versions Kubernetes >= 1.9. If kube-proxy is running in IPVS mode, theipvs-controller
of BalanceD must run in Pod Networking Mode to avoid conflict with IPVS.
BalanceD was tested to operate on Linux kernels >= 4.4. However, it should work in theory with any modern kernels with decent LVS/IPVS support.
This has been tested to work with:
make images
to build all controllers.
Go version 1.12 or above is required to build BalanceDmake build
to build all controllers.
BalanceD is built upon following open-source libraries:
- go-iptables:https://github.com/coreos/go-iptables
- netlink:https://github.com/vishvananda/netlink
- libnetwork:https://github.com/docker/libnetwork
and many more!
BalanceD has also been inspired by:
- kube-router:https://github.com/cloudnativelabs/kube-router
Feel free to leave feedback or raise any questions by opening an issuehere.
We encourage all kinds of contributions! Feel free to submit a PR!