netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wensong Zhang <wensong@linux-vs.org>
To: Horms <horms@verge.net.au>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
	Julian Anastasov <ja@ssi.bg>, Joseph Mack NA3T <jmack@wm7d.net>,
	Jinhua Luo <home_king@163.com>
Subject: Re: [PATCH] [IPVS] transparent proxying
Date: Wed, 29 Nov 2006 23:26:51 +0800	[thread overview]
Message-ID: <456DA6BB.6080800@linux-vs.org> (raw)
In-Reply-To: <20061129062126.GP25535@verge.net.au>


Hi Horms,

I see that this patch probably makes IPVS code a bit complicated and 
packet traversing less efficiently.

If I remember correctly, policy-based routing can work with IPVS in 
kernel 2.2 and 2.4 for transparent cache cluster for a long time. It 
should work in kernel 2.6 too.

For example, we can use iptables/ipchains to mark all web traffic with 
fwmark 1, then use policy-based routing to route all web traffic through 
NF_IP_LOCAL_IN, so that ip_vs_in can capture the packets and load 
balance packets to cache servers.
ip rule add prio 100 fwmark 1 table 100
ip route add local 0/0 dev lo table 100

ipvsadm -A -f 1 -s wlc
ipvsadm -a -f 1 -w 100 -r cache1
ipvsadm -a -f 1 -w 100 -r cache2
ipvsadm -a -f 1 -w 100 -r cache2

...

Cheers,

Wensong

Horms wrote:
> This seems to be a pretty clean solution to a real problem.
>
> Ultimately I would like to see IPVS move into the forward chain.
> This seems to be a nice way to explore that, without breaking
> any existing setups.
>
>   


  parent reply	other threads:[~2006-11-29 15:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29  6:21 [PATCH] [IPVS] transparent proxying Horms
2006-11-29 14:15 ` Thomas Graf
2006-11-29 14:46   ` Horms
2006-12-18  3:19     ` Horms
2006-12-18 14:17       ` Thomas Graf
2006-11-29 15:26 ` Wensong Zhang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-11-30  1:49 home_king
2006-12-01 15:41 ` Wensong Zhang
2006-12-04  5:53 home_king
2006-12-04 17:20 ` Wensong Zhang

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=456DA6BB.6080800@linux-vs.org \
    --to=wensong@linux-vs.org \
    --cc=davem@davemloft.net \
    --cc=home_king@163.com \
    --cc=horms@verge.net.au \
    --cc=ja@ssi.bg \
    --cc=jmack@wm7d.net \
    --cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).