From owner-freebsd-net@FreeBSD.ORG Mon Mar 3 14:21:05 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 144891065674 for ; Mon, 3 Mar 2008 14:21:05 +0000 (UTC) (envelope-from jym@ldh.org) Received: from mx0.kewego.com (mx0.kewego.net [194.62.234.66]) by mx1.freebsd.org (Postfix) with ESMTP id E22B88FC12 for ; Mon, 3 Mar 2008 14:21:04 +0000 (UTC) (envelope-from jym@ldh.org) Received: from pifpaf.cardinet.kewego.int (unknown [10.2.2.20]) by mx0.kewego.com (Postfix) with ESMTP id 1792233C66 for ; Mon, 3 Mar 2008 15:03:41 +0100 (CET) Message-ID: <47CC053B.5090307@ldh.org> Date: Mon, 03 Mar 2008 15:03:39 +0100 From: Jean-Yves Moulin User-Agent: Thunderbird 2.0.0.12 (X11/20080229) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: drlb: a direct routing loadbalancer X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 14:21:05 -0000 Hi everybody, I'have made a simple software load-balancer for FreeBSD. It work only in direct-routing mode. This is a kernel module that works for freebsd 6.2, 6.3 and 7.0 (tested) (and netbsd soon). It use pfil in order to watch incoming packet and redirect to real-server. You can define multiple virtual-ip for a same pool of real-server. You can use fourth scheduler: round-robin, least-connections, round-robin with weight and least-connections with weight. You can specify some timeout (before closing or dropping connections), persistence (for TLS) and the size of the connections hash table. When you inhibit real-server, only new connections are not redirected to it. The load-balancer keep open-connections (that's why I made it. IPVS does'nt do this job right). It come with two tools: drlbctl for configuring it. And lbdyn, who will check your real-server (ala keepalived). It's a very simple tool and I need some times to add useful features (like sharing of connections table..) but I use in in a production environment. IPv6 will be tested soon. You can find it here: http://jym.free.fr (under construction :-) and source here: http://jym.free.fr/files/drlb-0.7.tar.gz I will make a ports soon. Comments are welcome. Greetings from Paris! jym