LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] "selective balancing" - make requests from 1.2.3.4 go to

To: Patrick Schaaf <netdev@xxxxxx>
Subject: Re: [lvs-users] "selective balancing" - make requests from 1.2.3.4 go to realserver_A, all others - to realserver_B
Cc: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Tomasz Chmielewski <tch@xxxxxxxxxxx>
Date: Fri, 7 Mar 2014 12:47:21 +0100
On Fri, 7 Mar 2014 12:15:08 +0100
Patrick Schaaf <netdev@xxxxxx> wrote:

> Hi Tomasz,
> 
> 2014-03-07 11:52 GMT+01:00 Tomasz Chmielewski <tch@xxxxxxxxxxx>:
> > I was wondering if I can use ipvsadm not only for load balancing,
> > but also for "code testing".
> 
> The key to such usage, is fwmark based LVS virtual hosts. You then use
> the iptables -t mangle PREROUTING to set firewall mark depending on
> whatever iptables matches you come up with. Additionally ipset might
> come in handy here - write one ipset based match setting your "code
> testing" fwmark, then add and delete IPs from that set as needed,
> maybe even with a nice web frontend for your developers :)

Indeed.

iptables -t mangle -I PREROUTING -s 1.2.3.4 -j ACCEPT

on the realserver does the trick :)

-- 
Tomasz Chmielewski
http://wpkg.org



_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

<Prev in Thread] Current Thread [Next in Thread>