LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Bandwidth Limitation

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Bandwidth Limitation
From: Liew Toh Seng <linux_nic@xxxxxxxxxxxxxx>
Date: Fri, 11 Jun 2004 08:21:48 +0800
Hi,
currently i had installed RHEL 3.0 WS to my server. downloaded the ipvsadm-1.21-9.src.rpm from internet. compiled and installed to my server. i can't start my ipvsadm automatically when the system start. i have saw the error message mean that the ipvsadm is mismatch the current module. after my system is up, i try to type ipvsadm to show my setting but i found that it's not correct.

[root@beta root]# ipvsadm
IP Virtual Server version 1.0.8 (size=65536)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  beta.hello.com:82 rr persistent 360
TCP  beta.hello.com:81 rr persistent 360
TCP  beta.hello.com:http rr persistent 360
TCP  beta.hello.com:http rr persistent 360

so i try to restart the ipvsadm again and it's working. so i disable the ipvsadm to start automatically when the system is up. i configured the rc.local file to start the ipvsadm when the system is up. can i know how I'm going to solve this problem.

[root@beta root]# ipvsadm -L
IP Virtual Server version 1.0.8 (size=65536)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  beta.hello.com:82 rr persistent 360
  -> test2.hello.com:82        Masq    10     0          0
TCP  beta.hello.com:81 rr persistent 360
  -> test1.hello.com:81        Masq    10     0          0
TCP  beta.hello.com:http rr persistent 360
  -> test1.hello.com:http      Masq    10     73         272
  -> test2.hello.com:http      Masq    10     74         397
TCP  beta.hello.com:https rr persistent 360
  -> test1.hello.com:https     Masq    10     0          72
  -> test2.hello.com:https     Masq    10     0          15
------------------------------------------------------------------------ -------
Best Regards
Liew Toh Seng
Icq No: >> 36835809 <<
MSN: >> tohseng@xxxxxxxxxxx <<
* .--.
* |o_o |
* |:_/ |
* //
* (| | )
* /'\_ _/` The Internet Solution Company
* \___)=(___   My Directory Sdn Bhd
On Jun 11, 2004, at 4:23 AM, Florian wrote:

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



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