From: Roberto Nibali <ratz@tac.ch>
To: Chris Shepherd <chriss@whstuart.com>
Cc: Martin Josefsson <gandalf@wlug.westbo.se>,
Netfilter mailinglist <netfilter@lists.netfilter.org>
Subject: Re: ip_conntrack_http?
Date: Wed, 11 Dec 2002 10:56:20 +0100 [thread overview]
Message-ID: <3DF70BC4.1040302@tac.ch> (raw)
In-Reply-To: 1039534152.3df60848b8692@mail.whstuart.com
Hello,
While I think you've got a problem with your software architecture I assure you
that this can be handled with LVS.
>>No, this is how loadbalacing in iptables works, it balances the
>>individual connections.
>
> That's what I thought.
Load balancing done on a netfilter level is just not extremely intelligent. Use
LVS. It's the same story as with all the rather clumsy NF modules/enhancements,
like for example ROUTE. Use the tools that are given to you and don't cludge NF
with even more deisgns that are not complete. LVS does an excellent job at load
balancing, iproute2 does an excellent job on routing (and RR balancing too
actually).
>>>What happens now:
>>>CONN1a -> WS1
>>>CONN1b -> WS2
>>>CONN2a -> WS1
>>>CONN2b -> WS2
>>>
>>>What should happen:
>>>CONN1a -> WS1
>>>CONN1b -> WS1
>>>CONN2a -> WS2
>>>CONN2b -> WS2
>>>
>>>Provided that CONN1[ab] are related connections, but unrelated to
>>
>>CONN2[ab].
>>
>>How do you relate http connections to each other?
In LVS parlance you need persistency. The IP grouping can be achieved with
fwmark based load balancing, but in your case you won't need it anyway.
> Well, I would think the TCP RELATED flag should be set for the second
> connection from the browser. Not being a Netfilter programmer myself, I'm not
> sure if there's any connection identifier that's passed along with the RELATED
> connection information... If there was, would it not be possible to just
> forward all related connection IDs to one IP? So at most there should only be
> two or three connections in a group, and this would sort out situations where
> people sharing a connection would otherwise all end up on the same webserver,
> and not be effectively load balanced.
This is a problem, yes, but everyday reports on the LVS mailinglist do not
mention a big problem with this. Especially since the Internet is very dynamic
the load imbalance will eventually straighten out. So, don't worry about that.
> On the connection-level, is it possible to somehow see which connection a new
> connection is related to? If so, I would think it'd be logically easy, but not
> necessarily programmatically so.
It is relatively easy but not with netfilter. You can track connections with so
called connection templates and depending on the scheduler the templates vary.
It is much faster then netfilter.
> I will let you know when I get a chance to test it. I have the sneaky feeling
> that if this works properly (which it should), a lot of developers might wanna
> know about it. :)
I doubt this is a good solution. It may work but only solve a limited case of
load balancing.
>>>I am very interested in knowing, because it could save myself and a few
>>
>>dozen
>>
>>>webdevs I know a lot of money that we'd be spending on a hardware
>>
>>connection-
>>
>>>level load balancer.
Almost all the people on LVS save money by implementing LVS as a software load
balancer. It's made for that besides other reasons of course.
>>Other options may be the LVS, Linux Virtual Server project. I believe
>>they have loadbalancers and stuff for http.
Our load balancer doesn't really care about the protocol as long as it is L4.
>>From the documentation I've read, LVS does essentially the same thing as NF
> does: it forwards on a per connection basis. It too would succumb to this
> problem.
Please read the documentation again, you don't seem to have understood it. And
if you're still not sure about how it works, please join our newcomer-friendly
LVS mailinglist. Thanks.
Best regards,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc
prev parent reply other threads:[~2002-12-11 9:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-09 16:16 ip_conntrack_http? Chris Shepherd
2002-12-09 21:32 ` ip_conntrack_http? Martin Josefsson
2002-12-10 15:29 ` ip_conntrack_http? Chris Shepherd
2002-12-10 15:59 ` ip_conntrack_http? Martin Josefsson
2002-12-11 9:56 ` Roberto Nibali [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3DF70BC4.1040302@tac.ch \
--to=ratz@tac.ch \
--cc=chriss@whstuart.com \
--cc=gandalf@wlug.westbo.se \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.