loxilb architecture and modules
loxilb consists of the following modules :
- kube-loxilb
kube-loxilb is loxilb's implementation of kubernetes service load-balancer spec which includes support for load-balancer class, advanced IPAM (shared or exclusive) etc. kube-loxilb runs as a deloyment set in kube-system namespace. It is a control-plane component that always runs inside k8s cluster and watches k8s system for changes to nodes/end- points/reachability/LB services etc. It acts as a K8s Operator of loxilb. The loxilb component takes care of doing actual job of providing service connectivity and load-balancing. So, from deployment perspective we need to run kube-loxilb inside K8s cluster but we have option to deploy loxilb in-cluster or external to the cluster.
- loxicmd
loxicmd is command line tool to configure and dump loxilb information which is based on same foundation as the wildly popular kubectl tool.
- loxilb
loxilb is a modern goLang based framework (process) which mantains information coming in from various sources e.g apiserver and populates the eBPF maps used by the loxilb eBPF kernel. It is also responsible for loading eBPF programs to the interfaces.It also acts as a client to goBGP to exchange routes based on information from loxilb CCM. Last but not the least, it will be finally responsible for maintaining HA state sync with its remote peers. Almost all serious lb implementations need to be deployed as a HA cluster.
- loxilb eBPF kernel
eBPF kernel module implements the data-plane of loxilb which provides complete kernel bypass. It is a fully self contained and feature-rich stack able to process packets from rx to tx without invoking linux native kernel networking.
- goBGP
Although goBGP is a separate project, loxilb has adopted and integrated with goBGP as its routing stack of choice. We have also developed various features for this awesome project which are planned for upstreaming.
- DashBoards
Grafana based dashboards to provide highly dynamic insight into loxilb state.
The following is a typical loxilb deployment topology (HA is omitted here for simplicity) :