LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Load Balancing HTTP traffic does not seem to be working.

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Load Balancing HTTP traffic does not seem to be working.
From: "Scott Comboni" <scomboni@xxxxxxxxx>
Date: Mon, 8 May 2006 14:24:19 -0400
I believe it is working now.   I did discover one thing.  I was
assuming when I shutdown HTTPD on one node it would swap over to the
other node quickly.  It seems because I have persistence set to 600 it
waits to swap over.  Is there another config that I would need to
adjust to make the swap quicker when I do indeed loose a node?

Thanks so Much for your help.

scott


On 5/8/06, Scott Comboni <scomboni@xxxxxxxxx> wrote:
Hello again,

Well I checked each node for http and indeed they are working. Chaning
the CheckType to connect seems to have at least gotten a better
reading from ipvsadm

IP Virtual Server version 1.0.8 (size=65536)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  172.16.60.233:80 rr persistent 600
  -> 172.16.60.41:80              Route   1      0          15
  -> 172.16.60.25:80              Route   1      0          0

So I can successfully hit 172.16.60.233 which ---> 172.16.60.41
welcome page comes up.  If I stop the httpd service on this machine I
do not however get the 172.16.60.25 welcome page.



so my current setup is.
172.16.60.40 --- This is just running ldirectord
172.16.60.41 -- Real server all heatbeats and ldirectord are stopped
and no Firewall rules or arptable rules in place.
172.16.60.25 -- Real server same as above.

both .41 and .25 have the lo:0 card configured for 172.16.60.233
netmask 255.255.255.255

Seems like Im getting closer as at least now I can hit another machine
and my ipvsadm shows a weight value.

Do I need any FW or ARP rules at this piont on my director node?


scott

On 5/8/06, Scott Comboni <scomboni@xxxxxxxxx> wrote:
> OK first thanks again for the response.  I turned off evrything and
> ran just ldirectord and noticed this..
>
> when I run ipvsadm -L -n
>
> Not seeing any of my items with a weighted value.
> Also should I still have the arptables running in this config ?
>
> I have to believe at this point I must be missing something very simple.
>
> Both my Realservers have lo:0
> lo:0      Link encap:Local Loopback
>           inet addr:172.16.60.233  Mask:255.255.255.255
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>
>
>  ipvsadm -L -n
> IP Virtual Server version 1.0.8 (size=65536)
> Prot LocalAddress:Port Scheduler Flags
>   -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
> TCP  172.16.60.233:80 rr persistent 600
>   -> 172.16.60.41:80              Route   0      0          0
>   -> 172.16.60.25:80              Route   0      0          0
>   -> 127.0.0.1:80                 Local   1      0          0
>
>
>
> My ldirectord file is posted as well.
>
> checktimeout=10
> checkinterval=2
> #fallback=127.0.0.1:80
> autoreload=no
> #logfile="/var/log/ldirectord.log"
> logfile="local0"
> quiescent=yes
>
> # Virtual Server for HTTP
> virtual=172.16.60.233:80
>         fallback=127.0.0.1:80
>         real=172.16.60.41:80 gate
>         real=172.16.60.25:80 gate
>         service=http
>         request="index.html"
>         receive="Test Page"
>         scheduler=rr
>         persistent=600
>         protocol=tcp
>         checktype=negotiate
>
>
>
>
> On 5/8/06, Francisco Gimeno <kikov@xxxxxxxxx> wrote:
> > Hi..
> >
> > well I don't see clearly what's your architecture... but remember..
> > In the real servers you don't need ip_vs nor ldirectord nor heartbeat.
> >
> > The VIP is owned by the Director Box ( ie: balancer ) that should be
> > running ip_vs and ldirector and heartbeat ( if you want to have
> > another Director Box for backup purposes ).
> >
> > If you want to make things simpler: forget for one moment the heartbeat.
> >
> > Just run ldirectord in the Director Box. In this case, you have to
> > enable manually a eth0:0 ip alias in that box
> >
> > balancer# ifconfig eth0:0 VIP netmask 255.255.255.255
> > realserver1# ifconfig lo:0 VIP netmask 255.255.255.255 ; route add -
> > host VIP dev lo
> > realserver2# ifconfig lo:0 VIP netmask 255.255.255.255 ; route add -
> > host VIP dev lo
> >
> > then run ldirectord...
> > and see what's happening in the director with ipvsadm -L -n
> > You should see weight: 1 ( or whatever you have configured in
> > ldirectord ) if the Server has been correctly detected, or weight: 0
> > if the ldirector check failed...
> >
> > BR,
> > Francisco Gimeno
> > > Yes I verified this these items below.  The lo:0 card I have is not up
> > > on both Machines.. Should that be the case?  The machine that is my
> > > ldirectory Active node and realserver is
> > > bosdamweb52 root]# /etc/ha.d/resource.d/LVSSyncDaemonSwap master
> > > status
> > > master running
> > > (ipvs_syncmaster pid: 25685)
> > >
> > > This node is showing the apahce page.
> > >
> > > [root@bosdamweb52 root]# ip add sh
> > > 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
> > >    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> > >    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
> > > 4: eth0: <BROADCAST,MULTICAST,ALLMULTI,UP> mtu 1500 qdisc
> > > pfifo_fast qlen 1000
> > >    link/ether 00:30:48:80:4b:8d brd ff:ff:ff:ff:ff:ff
> > >    inet 172.16.60.40/24 brd 172.16.60.255 scope global eth0
> > >    inet 172.16.60.233/24 brd 172.16.60.255 scope global secondary eth0
> > > 5: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
> > >    link/ether 00:30:48:80:4b:8e brd ff:ff:ff:ff:ff:ff
> > >
> > >
> > > [root@bosdamweb53 ha.d]# ip add sh
> > > 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
> > >    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> > >    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
> > >    inet 172.16.60.233/32 brd 172.16.60.255 scope global lo:0
> > > 4: eth0: <BROADCAST,MULTICAST,ALLMULTI,UP> mtu 1500 qdisc
> > > pfifo_fast qlen 1000
> > >    link/ether 00:30:48:80:4b:da brd ff:ff:ff:ff:ff:ff
> > >    inet 172.16.60.41/24 brd 172.16.60.255 scope global eth0
> > > 5: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
> > >    link/ether 00:30:48:80:4b:d9 brd ff:ff:ff:ff:ff:ff
> > >
> > > Im also reading another post someone sent.
> > > http://www.austintek.com/LVS/LVS-HOWTO/HOWTO/LVS-HOWTO.LVS-
> > > NAT.html#one_network
> > >
> > > I currently have my default Gateway set to my Router not the director.
> > >
> > > Thanks for your continuing help on this.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 5/8/06, Francisco Gimeno <kikov@xxxxxxxxx> wrote:
> > >> hi
> > >>
> > >> the second part
> > >>
> > >> have you added the loopbacks ip in the real servers ?
> > >>
> > >> # ifconfig lo:1 172.16.60.233 netmask 255.255.255.255
> > >> # route add -host 172.16.60.233 dev lo
> > >>
> > >> have you configured the VirtualHost in Apache for 172.16.60.233 ?
> > >>
> > >> go to the real servers, and check there:
> > >> $ telnet 172.16.60.233 80
> > >> GET / HTTP/1.1
> > >> Host: HOSTNAME
> > >> <Enter>
> > >>
> > >>
> > >>
> > >> > Hello Francicso thanks for the response.
> > >> > I added another real server real=172.16.60.25:80 gate and no luck.
> > >> > Seems I can only access the machine that currently has the VIP
> > >> > established.
> > >> >
> > >> > scott
> > >>
> > >> __________________________________
> > >
> > > --
> > >
> >
> --
>


--
Scott Comboni
President
Zenplex Inc.
132 Pepes Farm Road Unit #6
Milford CT, 06460



--
Scott Comboni
President
Zenplex Inc.
132 Pepes Farm Road Unit #6
Milford CT, 06460

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