DRLB
Direct Routing Load Balancer. This is a software based load balancer, working at layer-4, for FreeBSD and NetBSD. Very similar to ipvs for linux. But drlb support only Direct Routing mode.
More information about direct routing.
We use it on a video platform that use several gigabytes of bandwidth. DRLB manage ten thousands of concurrents connections, without problem. But the path to a complete load-balancer is very long: currently, it doesn’t deal with ICMP, doesn’t send a TCP reset when it should. It doesn’t manage complex protocol like FTP.. But it works with IPv6, support four different load-balancing algorythms, and a maximum connection rate per server.
Further enhancements will be: *A total rewrite of lbdyn, with kqueue.
How it works ?
DRLB insert a hooks in pfil. It watch any incoming data. If an incoming connections is for a specified service (determined with IP and port) it will send it to one of the available servers. Servers can have a weight, in order to differenciate it’s capability. There are 4 schedulers available: round-robin, weighted-round-robin, least-connections and weighted-least-connections.
Supported OS:
Version 0.9 have been tested from FreeBSD-6.3 to FreeBSD-7.0. The 1.0-alpha is not ready for freebsd. The version 1.0 is using MODULAR framework of NetBSD-current (5.99.7). lbdyn is not yet available for 1.0-alpha. The API for load-balancer configuration have been changed. So, I need to rewrite some code.
http://jym.free.fr/files/drlb-0.9.tar.gz
http://jym.free.fr/files/drlb-1.0-alpha.tar.gz
License ?
DRLB is released under BSD license. See the LICENSE file in the archive for the copyright.
Why not continue IPVS for FreeBSD ?
First: no need to patch kernel. And because I want to learn kernel programming, because we have many problem with IPVS on linux, because we want only Direct Routing and a code that we can modify for our need… ! IPVS is not maintened anymore.
ToDo:
- ports and pkgsrc
- sharing of connections table not tested
- lbdyn is not finished yet, with version 1.0.
- icmp return and fragmentation
- Many, many test.
- …