Skip to content

A minimal example of using aya to build a loadbalancer with direct return

Notifications You must be signed in to change notification settings

pyaillet/aya-lb-dr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lb-dr

Experiment using eBPF and aya-rs to build a simple load balancer with direct return.

How to use

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

Prerequisites

  1. Install bpf-linker: cargo install bpf-linker
  2. Install containerlab

Build eBPF

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.

Build Userspace

cargo build

Deploy the example lab

Check the make targets and use the default one:

make deploy

About

A minimal example of using aya to build a loadbalancer with direct return

Topics

Resources

Stars

Watchers

Forks