From owner-freebsd-net Thu Mar 18 19:11:38 1999 Delivered-To: freebsd-net@freebsd.org Received: from maxwell.syr.edu (maxwell.syr.edu [128.230.129.5]) by hub.freebsd.org (Postfix) with ESMTP id 3072114EE4 for ; Thu, 18 Mar 1999 19:11:34 -0800 (PST) (envelope-from cmsedore@maxwell.syr.edu) Received: from exchange.maxwell.syr.edu (exchange.maxwell.syr.edu [128.230.129.241]) by maxwell.syr.edu (8.9.1a/8.9.1) with ESMTP id VAA26188; Thu, 18 Mar 1999 21:59:13 GMT Received: by exchange.maxwell.syr.edu with Internet Mail Service (5.5.1960.3) id ; Thu, 18 Mar 1999 22:11:14 -0500 Message-ID: <262C3DA9BE0CD211971700A0C9B413A1CBD7@exchange.maxwell.syr.edu> From: Christopher Sedore To: "'Julian Elischer'" Cc: "'freebsd-net@freebsd.org'" Subject: RE: clustering/load balancing Date: Thu, 18 Mar 1999 22:11:04 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.1960.3) Content-Type: text/plain Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > From: Julian Elischer [SMTP:julian@whistle.com] > > Christopher Sedore wrote: > > > > OK, so I've worked some more on the IP clustering/load balancing > stuff. > > I've hacked together a clustering daemon, and reworked the way that > the > > kernel stuff is handled (it uses a flag and ipfw rules to do its > thing). > > > > rather cool but how about the following setup running with no mods > at all.. > +-------[Machine B] > | > [internet]-----[ Machine A]-----+-------[Machine C] > | > +-------[Machine D] > > Machine A's internet port is on ed0 > firewall rules: > > on Machine A: > ipfw add 100 fwd B tcp from 0.1.0.0:0.3.0.0 to A 80 in recv ed0 > ipfw add 100 fwd C tcp from 0.2.0.0:0.3.0.0 to A 80 in recv ed0 > ipfw add 100 fwd D tcp from 0.3.0.0:0.3.0.0 to A 80 in recv ed0 > > on machine B: > ipfw add 100 fwd localhost tcp from any to A 80 in recv ed0 > on machine C: > ipfw add 100 fwd localhost tcp from any to A 80 in recv ed0 > on machine D: > ipfw add 100 fwd localhost tcp from any to A 80 in recv ed0 > > This shared the load among all 4 machines A, B, C, and D > depending on the two bottom bits of the 2nd byte of the source > address. > > I haven't tried this but I think it SHOULD work.. > (of course you could use a 5th machine as the load sharer) > > what do you think? > It should work, though the fwd localhost would have to imply that we should accept A's address as our own (not sure if that is implied or not, or if I'm just missing something). The difference is that you are solely dependant on machine A. If A croaks, you're done. That is, you've got a single machine depenancy--fine for load sharing, but perhaps not optimal for clustering with fault tolerance. If you have to have aliases for A's address, I think that B, C, and D would need separate links back to A to eliminate IP address conflict issues, or you'd need mods similar to mine. You may have additional problems with high load on A. I know that our (admittedly behind the times) PP200 FreeBSD firewall can get a bit busy when we pass the 4000pps (that is 4000pps on the in and the out interfaces simultaneously) mark. This means that you'd need additional metrics to determine how much loading A should get vs the rest, recognizing that you may increase application latency on A as the load on B, C, and D increase. Of course, if you were using FreeBSD for A anyway my methodology would leave excess CPU cycles for waste on that box. (Also, I don't have any code for differential load control either, and it could certainly happen in my scenario though the effects would probably not be as dramatic). -Chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message