Giter Site home page Giter Site logo

xdp-loadbalancer's Introduction

XDP Loadbalancer

To load xdp bytecode

Load:

./xlb -i eth0 -v

Unload:

./xlb -i eth0 -r

Check to see the xdp binary is loaded

# ip link show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 xdp qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:11:00:1b brd ff:ff:ff:ff:ff:ff
    prog/xdp id 94 tag e09d47c63a72ab36 jited 

The line, "prog/xdp id 94 tag e09d47c63a72ab36 jited" indicate that the xdp byte code is correctly hooked to the eth0.

Setup loadbalancer

Basic usage of the xlb_cmdline

Usage: ./xlb_cmdline [...]
    -i Interface name(eg. eth0)
    -A ServiceIP(a.k.a. VIP)
    -t (for TCP, optional, default)
    -u (for UDP, optional)
    -r WorkerIP
    -v verbose
    -L list lb table
    -l list lbcache
    -h Display this help

Create service

./xlb_cmdline -i eth0 -A 10.1.4.1 -p 80

Add real servers

./xlb_cmdline -i eth0 -a 10.1.4.1 -p 80 -r 10.0.0.24
./xlb_cmdline -i eth0 -a 10.1.4.1 -p 80 -r 10.0.0.23
./xlb_cmdline -i eth0 -a 10.1.4.1 -p 80 -r 10.0.0.22

Show registered services.

./xlb_cmdline -i eth0 -L
service: 10.1.4.1:80(6) {
src: 10.0.0.27, dst: 10.0.0.22 (52:54:0:11:0:16)
src: 10.0.0.27, dst: 10.0.0.23 (52:54:0:11:0:17)
src: 10.0.0.27, dst: 10.0.0.24 (52:54:0:11:0:18)
}

Delete real servers

./xlb_cmdline -i eth0 -d 10.1.4.1 -p 80 -r 10.0.0.22
./xlb_cmdline -i eth0 -d 10.1.4.1 -p 80 -r 10.0.0.23
./xlb_cmdline -i eth0 -d 10.1.4.1 -p 80 -r 10.0.0.24

Delete service

./xlb_cmdline -i eth0 -D 10.1.4.1 -p 80

xdp-loadbalancer's People

Contributors

ktaka-ccmp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xdp-loadbalancer's Issues

Future request

Hi,

Hope you doing well.

This repository very much helps to understand the XDP LB.

I want additionally to show the Live connection details to include this code .

If possible means ,Please do the need full or kindly guide me on this connection related details .
My Mail ID : [email protected]

Senthil.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.