xiaozhangchannel / arkLB

eBPF/XDP based load balancer made using libbpf library and C/C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

arkLB

An eBPF/XDP load balancer for cloud and microservices

License Repo Size Last Commit Docker build

Quick Start

Docker

Terms

Here are some of the links explaining the eBPF and XDP

Install guide

This project needs to be run in a linux environment as supported bpf tools are present in the linux kernel

Run the following commands to install the dependencies in your system

bash install.sh

Then run the following commands to compile the project. Make sure to change values in Makefile.in and configure.ac to your needs

bash start.sh

To stop the program, run the following command

# To stop running the XDP program
make clean

After compiling, run the python hello.py with sudo privileges to see the trace logs

NOTE: Change your network interface in Makefile else the program may not work properly

Docker

If you have Docker installed in your system, you can workaround the project using the command

docker compose up
# SSH into the container and edit details from there
sudo docker exec -it arklb-arklb-1 /bin/bash

Terraform

If you have Terraform installed in your system, you can run the following commands to create VMs in GCP/AWS and run the project in it. Make sure to change the values in terraform/gcp/main.tf or terraform/aws/main.tf to your needs.

cd terraform/gcp # or cd terraform/aws
terraform init
terraform apply

Tools used

  • bcc
  • libbpf
  • clang
  • Terraform
  • Python (for trace logs)
  • Docker

License

GPL 3.0

About

eBPF/XDP based load balancer made using libbpf library and C/C++

License:GNU General Public License v3.0


Languages

Language:C 81.1%Language:Shell 13.4%Language:LLVM 3.4%Language:Makefile 1.9%Language:HCL 0.1%Language:M4 0.1%Language:Dockerfile 0.0%Language:Go 0.0%Language:Python 0.0%