All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Newkirk <netfilter@newkirk.us>
To: Ian Douglas <ian@icreditvision.com>, netfilter@lists.netfilter.org
Subject: Re: using iptables for poor-man's load balancing?
Date: Wed, 19 Feb 2003 23:24:34 -0500	[thread overview]
Message-ID: <200302192324.34042.netfilter@newkirk.us> (raw)
In-Reply-To: <HMEBKOCKLOOEJGIOMFAPIEKBFJAA.ian@icreditvision.com>

Hmmm.  A random neuron-firing leads me to another idea:

Try testing from multiple source IPs simultaneously.  Adding 2-3 alias 
interfaces on the test client (eth0=192.168.1.1,eth0:1=192.168.1.2, etc) 
and distributing your test connections across them could VERY possibly 
make the difference.  (two separate machines would guarantee a valid 
test, but I suspect multiple IP's would be sufficient)  Connection 
tracking may see that all the traffic is between the same two IP's 
(before the DNAT) and keep it coherent by always DNATting to the same 
destination.

If that's not it, (and I have a strange feeling it IS) I have two more 
suggestions:^)

1 - Try the contiguous-IP setup if possible, even if just changing the 
two servers to a different subnet for the test.  (and changing the IP of 
the iptables box to match, obviously, or adding a new IP as an alias on 
the internal interface)

2 - Modify your test approach to transfer a sizeable file on each 
connection.  Maybe a 1mb file, and try several simultaneous:

wget -q -O - http://server/onemegfile.tmp >/dev/null

Not a tremendous amount of traffic, but certainly enough to ensure 
several active connections.

j

On Wednesday 19 February 2003 07:55 pm, Ian Douglas wrote:
> > The only reason I can think of (now) that all your traffic went to
> > the first on the list is that there simply wasn't any load to speak
> > of.  How were you testing?
>
> By blasting traffic at the system that's doing the packet forwarding.
> Perhaps I can write some different code on the web servers that will
> hold the connection for a while (ie: call a perl script that does a
> 'sleep 60' or something) and test it that way.
>
> > Multiple simultaneous connections?
>
> Yes. I have a script that cycles through a perl script (I'll call it
> blasticv.pl) that calls another perl script (I'll call it icv.pl) with
> 3 varying parameters... each occurrence of that icv.pl makes a
> connection to the web server to send and retrieve a chunk of data.
> "blasticv.pl" cycles through and calls icv.pl 100 times with each of
> the 3 parameters, and not sleeping at all in the loop. This should
> simulate 300 requests on the web servers that, given the timing to
> complete a single request, would mean we'd have about 200 active
> requests at the peak of activity, yet every single 'hit' on the
> systems landed on 1.1, and not a single hit on 1.12.
>
> > it will simply keep sending traffic to the first
> > on the list, only using the next one if there is more traffic
> > 'currently' (presumably based on the connection-tracking data) on
> > the first destination than on the second.
>
> ... which is what I read, also, yet it seemed that causing a good
> volume of busy traffic didn't forward anything to 1.12
>
> -id



  reply	other threads:[~2003-02-20  4:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-18 21:53 using iptables for poor-man's load balancing? Ian Douglas
2003-02-18 22:02 ` Ian Douglas
2003-02-19 23:17 ` Ian Douglas
2003-02-20  0:12   ` Joel Newkirk
2003-02-20  0:30     ` Joel Newkirk
2003-02-20  0:55       ` Ian Douglas
2003-02-20  4:24         ` Joel Newkirk [this message]
2003-02-21  8:48 ` Fabrice MARIE
  -- strict thread matches above, loose matches on Subject: below --
2003-02-18 22:10 Andrej Ricnik
2003-02-19 18:47 ` Ian Douglas
     [not found] <20030219232644.14732.18331.Mailman@kashyyyk>
2003-02-20  3:00 ` mpboden
2003-02-20  3:39   ` SBlaze

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=200302192324.34042.netfilter@newkirk.us \
    --to=netfilter@newkirk.us \
    --cc=ian@icreditvision.com \
    --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.