Apache cluster question

Discussion in 'HOWTO-Related Questions' started by mihaimustea, Dec 6, 2009.

  1. mihaimustea

    mihaimustea New Member

    Hello,

    I managed to setup a webcluster using this tutorial: http://howtoforge.com/set-up-a-loadbalanced-ha-apache-cluster-ubuntu8.04 . But I planned to host the mysql server used by the clustered apps on the loadb. Can you tell me if there is a posibility to connect from a node (all nodes) to the active loadb (using the virtual interface) considering that IP address is bound to lo:0? I tried adding a route, but without success.

    Hope I explained everything well enough,
    Thank you.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ifconfig
    on the active load balancer?
     
  3. mihaimustea

    mihaimustea New Member

    Hello,

    Thanks for the reply, here is the output of ifconfig:

    Code:
    eth0    Link encap:Ethernet  HWaddr 00:30:48:D4:D4:66
              inet addr:x.9.41.3  Bcast:85.9.41.255  Mask:255.255.255.0
              inet6 addr: fe80::230:48ff:fed4:d466/64 Scope:Link
              UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
              RX packets:216347331 errors:0 dropped:0 overruns:0 frame:0
              TX packets:236584330 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:100
              RX bytes:28211839962 (26.2 GiB)  TX bytes:295732341723 (275.4 GiB)
              Base address:0x2000 Memory:d8000000-d8020000
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:29511345 errors:0 dropped:0 overruns:0 frame:0
              TX packets:29511345 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:23775772921 (22.1 GiB)  TX bytes:23775772921 (22.1 GiB)
    
    The virtual IP of the cluster (where www is) is x.9.22.128.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    The virtual IP doesn't seem to be bound to the active load balancer right now...
     
  5. mihaimustea

    mihaimustea New Member

    It is running:
    Code:
    IP Virtual Server version 1.2.1 (size=4096)
    Prot LocalAddress:Port Scheduler Flags
      -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
    TCP  x.9.41.2:80 rr
      -> x.9.41.5:80                 Route   0      0          0
      -> x.9.41.6:80                 Route   1      0          0
      -> x.9.41.7:80                 Route   0      0          0
    
    Code:
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
        link/ether 00:0c:29:6a:4c:97 brd ff:ff:ff:ff:ff:ff
        inet x.9.41.3/24 brd x.9.41.255 scope global eth0
        inet x.9.41.2/24 brd x.9.41.255 scope global secondary eth0
        inet6 fe80::20c:29ff:fe6a:4c97/64 scope link
           valid_lft forever preferred_lft forever
    
    Code:
    ldirectord for /etc/ha.d/ldirectord.cf is running with pid: 3221
    
    Code:
    master running
    (ipvs_syncmaster pid: 3308)
    
    So .2 is the virtual ip and .3 is the address of the server. The cluster is working, I just want to access other services on that machine (the active loadb). By the way, are these daemons eating a lot of resources or I can store here a mysql server? The application (website) is getting a lot of hits in some periods of time. The server is a quad core xeon E5450 @ 3.00GHz with 3 gigs of ram and at the moment is hosting that application (magento based). As I saw in the "bad-moments", mysql is not eating that much resources as apache (because of magento's code).

    Thank you for your help.. and awsome site :)
     

Share This Page