LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: Bandwidth Limitation

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Bandwidth Limitation
From: "Peter Mueller" <pmueller@xxxxxxxxxxxx>
Date: Thu, 10 Jun 2004 11:15:35 -0700
> I have a standard cluster : 1 loadbalancer, 3 webserver, 1 
> dataserver and
> I'm looking for a solution of bandwidth limitation per 
> customer... I have three solutions :

Ok.

> 1) Attribute one VIP per customer and limit bandwidth per IP 
> with a routeur.
> Is it possible to give ipvs something like 30 VIP and 30 IP 
> on a network card ?

In Linux this is possible in lots of ways.  The most common methods are
iproute2 type "ip addr add ip.goes.here.foo/32 dev eth0" or using ip
aliasing.  You can use keepalived or ultramonkey (heartbeat) to manage
it for you.

> 2) Limit bandwidth with ipvs... But i need limitation by 
> host... Is anyone success it ??

You can do it with firewall marks.  Something like:

# Setup the fwmarks VIP, mark by host
$IPTABLES -A INPUT -i $EXT_INT -p tcp -s $CUSTOMERIP1 -d $VIP1 --dport
80 -m 1 -j ACCEPT
$IPVSADM -A -f 1 -s wrr
$IPVSADM -a -f 1 -r $REALSERVER1

You can then add some kind of limit to the marked packets.  I don't
remember the syntax, but it is probably something like: -m limit --limit
5/second.  This is what I have for ICMP limiting.

Or maybe a QOS/traffic control setup will work.  For example,
http://lartc.org/howto/lartc.ratelimit.single.html.  QOS & traffic
control rocks.

> 3) Your solutions ?? Explain to me :)

Hope it helps,

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