Skip to content

REZ-OAN/lb-xdp-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CUSTOM LOADBALANCER WITH XDP

Table Of Contents

Prerequisite

Step-1 (clone the repository)

 git clone https://github.com/REZ-OAN/lb-xdp-poc.git

Step-2 (Build Necessary Docker Images)

Navigate to the lb-xdp-poc directory (root directory for the application)

  • For CLIENT-SERVER
make build_client
  • For LOADBALANCER-SERVER
make build_lb

How i installed eBPF on docker image?

  • For SERVER-BACKEND
make build_server

Step-3 (Generate Necessary Files using bpf2go)

To interact with bpf_maps we have to convert the bpf code into go and object file.github.com/cilium/ebpf/cmd/bpf2go this module helps us to do this.Navigate to lb-backend.

To generate execute the following command :

go generate

This will generate the necessary files for you.

You Will See these logs :

go_generate_logs

Step-4 (Build The lb-backend Binary)

Navigate to lb-backend. To build execute the following command :

go build

Step-5 (Install The Necessary Packages)

Navigate to lb-frontend. To install necessary packages execute the following command:

npm i

Step-6 (Hands On)

To see the hands on demonstration visit HandsOn load_balancer_xdp