LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: Bandwidth Limitation

To: "'LinuxVirtualServer.org users mailing list.'" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Bandwidth Limitation
From: "Florian" <florian@xxxxxxxxx>
Date: Thu, 10 Jun 2004 22:23:02 +0200
I will try the second solution :

----
> 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.
----


I'll feedback when i'll experience this one !
Thanks for your answer !!

Florian


 

-----Message d'origine-----
De : lvs-users-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:lvs-users-bounces@xxxxxxxxxxxxxxxxxxxxxx] De la part de Peter
Mueller
Envoyé : jeudi 10 juin 2004 20:16
À : LinuxVirtualServer.org users mailing list.
Objet : RE: Bandwidth Limitation

> 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
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx Send
requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users



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