Date: Thu, 18 Mar 1999 22:11:04 -0500 From: Christopher Sedore <cmsedore@maxwell.syr.edu> To: "'Julian Elischer'" <julian@whistle.com> Cc: "'freebsd-net@freebsd.org'" <freebsd-net@FreeBSD.ORG> Subject: RE: clustering/load balancing Message-ID: <262C3DA9BE0CD211971700A0C9B413A1CBD7@exchange.maxwell.syr.edu>
next in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?262C3DA9BE0CD211971700A0C9B413A1CBD7>