From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: Trying to achieve fail over to multiple DNATed destinations
Date: Tue, 09 Aug 2011 14:57:51 -0500 [thread overview]
Message-ID: <4E41913F.9080203@riverviewtech.net> (raw)
In-Reply-To: <CADCwhZm3JXpb=YMpsjWdd+tpwDtdUzOyKSwatpEzEX681=2tWA@mail.gmail.com>
On 08/08/11 17:36, Mark Ruth wrote:
> The problem is that the target webserver (i.e. www.example.com ) is
> loadbalanced between like 10 servers having 10 public IPs (which are
> NOT in series), but since IPtables can not accept domain names
> (correct me if i m wrong) I have to select 1 ip address (i.e.
> 201.23.11.22 ) from the pool of 10 available, for my iptables rule.
It is my (mis)understanding that the iptables command will accept host
names and resolve them to an IP which is inserted in to the kernel. So,
you are close.
> Now i want to handle this situation with some sort of failover rule
> that can forward users to next ip in list if 1st DOES NOT RESPOND for
> some reason. Another thing that I want to achieve is to distribute
> load between target's multiple servers rather then just 1 IP address,
> something as follows,
...
> I will highly appreciate if someone can help me out resolving this issue.
Have you done any looking at the Linux Virtual Server project
(http://www.linuxvirtualserver.org/)?
I think you are using it a little backwards of what is normally done
(in-to-out vs out-to-in) but I think it would still work.
I.e. you create a LVS on your CentOS box that uses the 10 real IPs out
on the internet as the real servers. LVS will then distribute the load
between them and monitor their response times and know when to take one
out of the pool based on lack of many different criteria (response time
or lack of response).
I also think that LVS has an added advantage for you (unless memory is
failing me, again) is that LVS runs in kernel space (much like IPTables)
with a few user space commands to configure it, where as an application
layer proxy would actually run in user space.
I've not messed with LVS in a long time, but from memory, I think it
could be made to do what you are wanting to do. Further, LVS was
relatively trivial to install and configure.
Grant. . . .
next prev parent reply other threads:[~2011-08-09 19:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CADCwhZk8VdOCKQ5QA_aEG_Z9naqfJvbjdd=MAR4Pk5R_L4-xHg@mail.gmail.com>
2011-08-08 22:36 ` Trying to achieve fail over to multiple DNATed destinations Mark Ruth
2011-08-08 22:46 ` Jan Engelhardt
2011-08-08 23:15 ` Mark Ruth
2011-08-09 19:57 ` Grant Taylor [this message]
2011-08-10 9:01 ` Tyler J. Wagner
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=4E41913F.9080203@riverviewtech.net \
--to=gtaylor@riverviewtech.net \
--cc=netfilter@vger.kernel.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.