Apache Session Aware Load balancer

Discussion in 'Server Operation' started by neothe1, Apr 1, 2008.

  1. neothe1

    neothe1 New Member

    Hi all,

    I've used the guide from the howtoforge regarding Creating A Session-Aware Loadbalancer Using mod_proxy_balancer (Debian Etch)

    However, I'm not able to edit worker setting for my backend servers.

    Can anyone please tell me how to check the errors?

    Appreciate it...
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Why?

    Please check the Apache error logs.
     
  3. neothe1

    neothe1 New Member

    Hi falko,

    can you please show me the correct steps for the dns server setting and web server setting?

    i have 1 dns server and 2 backend web servers
    dns server - www.example.com 192.168.1.1
    web server 1 - http1.example.com 192.168.1.2
    web server 2 - http2.example.com 192.168.1.3

    Please help me here...really appreciate it
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What exactly is the problem?
     
  5. neothe1

    neothe1 New Member

    The problem is I'm not able to edit the worker setting for my backend servers when I click my worker URL...It won't display as shown in the guide

    And also how do I determine my backend servers are running properly? Will it alert us when one of my backend servers is down?

    What should be configured for my DNS server?

    REALLY NEED YOUR KIND ADVICE...falko

    THANK YOU
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What do you mean with worker URL? There's no such thing mentioned in the tutorial. Do you mean the Balancer Manager page?

    You can see that on the Balancer Manager page.

    Just create records for your backend nodes and www.
     
  7. neothe1

    neothe1 New Member

    Yes, it is at the balancer manager page.

    It won't display the worker setting as shown in your guide. Please help a newbiew here. Really need it.

    Here's my configuration in dns server
    DNS IN A 192.168.1.1
    www IN A 192.168.1.1
    http2 IN A 192.168.1.2
    http3 IN A 192.168.1.3

    Thank you
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Does your load balancer vhost look like this?

    Code:
    NameVirtualHost *
    <VirtualHost *>
            ServerName www.example.com
            ServerAlias example.com
            DocumentRoot /var/www/
            ProxyRequests Off
    
            <Proxy *>
              Order deny,allow
              Allow from all
            </Proxy>
    
            ProxyPass /balancer-manager !
            ProxyPass / balancer://mycluster/ stickysession=BALANCEID nofailover=On
            ProxyPassReverse / http://http1.example.com/
            ProxyPassReverse / http://http2.example.com/
            <Proxy balancer://mycluster>
              BalancerMember http://http1.example.com  route=http1
              BalancerMember http://http2.example.com  route=http2
              ProxySet lbmethod=byrequests
            </Proxy>
    
            <Location /balancer-manager>
              SetHandler balancer-manager
    
              Order deny,allow
              Allow from all
            </Location>
    </VirtualHost>
     
  9. neothe1

    neothe1 New Member

    Yes it is exactly the same as shown...I just wondering anything wrong with my Load Balancer...I mean the DNS setting. Do they need the same apache2 version for the back end servers?
     
  10. falko

    falko Super Moderator Howtoforge Staff

  11. neothe1

    neothe1 New Member

    This is what I get from the load balancer when I click the url under worker setting in the balancer manager page

    [Fri Apr 11 12:13:12 2008] [error] ap_proxy_connect_backend disabling worker for (http3.example.com)
    [Fri Apr 11 12:13:43 2008] [notice] child pid 2706 exit signal Segmentation fault (11)
    [Fri Apr 11 12:13:43 2008] [notice] child pid 2707 exit signal Segmentation fault (11)
    [Fri Apr 11 12:17:13 2008] [notice] child pid 2704 exit signal Segmentation fault (11)
    [Fri Apr 11 12:17:19 2008] [notice] child pid 3629 exit signal Segmentation fault (11)

    I have shutdown both my back end web servers from the time I get this message. The balancer manager can detect error at the status there.

    Even I have my back end servers are on, but still I cannot view the worker setting.

    It's just the worker setting I'm not able to view. Other things work well

    Please help...Thank you
     
  12. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    apache2 -t
    ? Does it show any syntax errors?
     
  13. neothe1

    neothe1 New Member

    It shows syntax OK

    What is wrong with my configuration here?

    I've been trying to get it working for a long time and it makes me sick!!!

    Others can, but why I cannot?
     
  14. neothe1

    neothe1 New Member

    Please help...Really appreciate it
     
  15. falko

    falko Super Moderator Howtoforge Staff

    Please check your configuration again and make sure that you followed the tutorial to the letter. Maybe you made a typo somewhere?
     
  16. neothe1

    neothe1 New Member

    Can you please show me how to set the DNS for my load balancer?

    And also do I need to set alias for www in my virtual host of my backend web servers?

    I've checked my setting for many many times and everything looks exactly the same as the tutorial.

    Can you please help here?? Thank you
     
  17. falko

    falko Super Moderator Howtoforge Staff

    Are you running your own name servers, or does someone else (e.g. your registrar) do this for you?
     
  18. neothe1

    neothe1 New Member

    I'm the one doing all the testing. I create a simple DNS like test.com in a LAN. Then I just create 2 backend servers to test the load balancer.

    Can you please guide me on how to configure the DNS together with the load balancer? I mean DNS server serves as load balancer.

    Thank you
     
  19. falko

    falko Super Moderator Howtoforge Staff

    You mean you want to install BIND or MyDNS or some other DNS server on the load balancer? You can use one of the guides from the DNS category: http://www.howtoforge.com/howtos/dns
     
  20. neothe1

    neothe1 New Member

    Can you please show me how did you get the load balancer work include all the settings with DNS server?

    Please show me your way to make the things work...Much appreciated
     

Share This Page