Skip to contentSkip to conversation

CBQ and load balancing -> solved

LARTC joern maier [email protected] 1 participant 1 message Oct 11, 2000

lore
Share & tools
lore

joern maier [email protected]

author
#0 lore raw

<PRE>Hi there,

I got the solution for my problem, and thought may at someday somebody could use it. Julian Anastasov and some people from the LVS mailing list helped me with it.

---

Subject: Re: LVS and CBQ
Date: Tue, 10 Oct 2000 22:53:01 +0000 (GMT)

   From: Julian Anastasov &lt;<A HREF="mailto:[email protected]">[email protected]</A>&gt;
     To: joern maier &lt;<A HREF="mailto:[email protected]">[email protected]</A>&gt;
     CC: &quot;<A HREF="mailto:[email protected]">[email protected]</A>&quot;

&lt;<A HREF="mailto:[email protected]">[email protected]</A>&gt;

LVS currently uses fwmark only to lookup the virtual service. If you mark packets they don't hit non-fwmark virtual services. This problem is known from long time. May be now it is time the packets with fwmark!=0 to be checked for non-fwmark services too. I.e. we will perform two lookups for virtual service for the marked packets: little performance drop for the fwmark users.

You can't use ipchains to distinguish the packets to different
real servers in VS/DR mode. The packets are not changed. If you trace them you can see that only the MAC address is different. The real server IP is used only for the routing decision, i.e. to select the parameters for the lower layer. For VS/TUN and VS/NAT you can safely rely on the IP header to extract the real server IP but not for LVS/DR. This is the way LVS/DR is working: the destination address in the IP header is not changed, it is same for all real servers: the VIP.

---

so that´s what I did:

I had to setup my VS WITH IP-TUNNELING and make an entry like this

-&gt; for the load balancer (LVS)

ipvsadm -A -f 100 -s lc
ipvsadm -a -f 100 -r &lt;realserver1_IP&gt; -i
ipvsadm -a -f 100 -r &lt;realserver2_IP&gt; -i
ipvsadm -a -f 100 -r &lt;realserver3_IP&gt; -i

having a rule in my ipchains table like that:

# ipchains -A input -p http -s &lt;client-IP&gt; -m 1 

and setting up a CBQ filter

# tc filter add dev eth0 protocol ip parent 100:0 prio 100 handle 100 fw
classid 100:100

the VS-director passes only the specified maximum of traffic to the realservers this is exactly what I´ve been looking for

thanks to everybody supporting me here as well

cheers,
Joern Maier

</PRE>