Skip to content
/ tinyLB Public
forked from ENSREG/tinyLB

A tiny load balancer, implemented by XDP.

License

Notifications You must be signed in to change notification settings

bugorz/tinyLB

 
 

Repository files navigation

TinyLB (Tiny Load Balancer)

該專案受 eBPF Summit 2021: An eBPF Load Balancer from scratch 啟發,並且修改自 lb-from-scratch 專案。

什麼是 TinyLB?

一個不到 100 行的 eBPF 程式,它利用 XDP 實作一個簡單的 HTTP load balancer。 TinyLB 依賴 libbpf(commit: 8bdc267),開始前請先下載 libbpf:

cd tinyLB
git clone https://github.com/libbpf/libbpf.git
cd libbpf
git checkout 8bdc267

開始

首先,編譯 load balancer 所需要的 docker image:

cd tinyLB
./build_image.sh

編譯完成後,執行以下指令啟動測試環境:

cd compose
docker compose up

觀察 TinyLB 的輸出

sudo cat /sys/kernel/debug/tracing/trace_pipe

About

A tiny load balancer, implemented by XDP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 64.2%
  • Makefile 20.3%
  • Dockerfile 10.0%
  • Shell 4.7%
  • Python 0.8%