From owner-freebsd-questions@FreeBSD.ORG Tue Jul 12 08:11:42 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AF6B106566C for ; Tue, 12 Jul 2011 08:11:42 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9D2088FC13 for ; Tue, 12 Jul 2011 08:11:39 +0000 (UTC) Received: by wyg24 with SMTP id 24so4249879wyg.13 for ; Tue, 12 Jul 2011 01:11:39 -0700 (PDT) Received: by 10.227.9.80 with SMTP id k16mr5194722wbk.20.1310458299087; Tue, 12 Jul 2011 01:11:39 -0700 (PDT) Received: from dfleuriot-at-hi-media.com ([83.167.62.196]) by mx.google.com with ESMTPS id fp5sm9435034wbb.32.2011.07.12.01.11.37 (version=SSLv3 cipher=OTHER); Tue, 12 Jul 2011 01:11:37 -0700 (PDT) Message-ID: <4E1C01BA.3020406@my.gd> Date: Tue, 12 Jul 2011 10:11:38 +0200 From: Damien Fleuriot User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Unga References: <1310402991.9928.YahooMailClassic@web160114.mail.bf1.yahoo.com> In-Reply-To: <1310402991.9928.YahooMailClassic@web160114.mail.bf1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Transparent load balancing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2011 08:11:42 -0000 On 7/11/11 6:49 PM, Unga wrote: > Hi all > > I need to implement a transparent load balancing daemon in C. > > That is, the daemon accept a TCP connection, get more info from the client, and forward the communication transparently to another server to handle it. > > How this could be implemented on FreeBSD? What basic primitives I should study more? > > Many thanks in advance. > > Best regards > Unga > Hey up, 2 questions come to mind: 1/ "get more info from the client" -> what kind of info ? 2/ have you considered HAProxy ? It does offer a TCP mode.