Experiment using eBPF and aya-rs to build a simple load balancer with direct return.
There is an example setup with containerlab in the ./test/
directory.
You can deploy all what's necessary with make deploy
(which is the default make target).
You can then test a request from the client
container to the VIP:
docker container exec clab-aya-lb-dr-client curl --silent --head 192.168.31.50
- Install bpf-linker:
cargo install bpf-linker
- Install containerlab
cargo xtask build-ebpf
To perform a release build you can use the --release
flag.
You may also change the target architecture with the --target
flag.
cargo build
Check the make targets and use the default one:
make deploy