Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
/ arkLB Public archive

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

License

Notifications You must be signed in to change notification settings

ark-7/arkLB

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