PDA

View Full Version : Load Balancing, Apache, Debian, mod_proxy_balancer for Wordpress, vBulletin & vBSEO


wowglider
06-25-2010, 10:08 AM
Hello,
ive 1 forum with atm not so much traffic to load balance it, but i know it would be better for the next years, so i bought a 2. server to load balance all vhosts i have on them.

Thats my configuration:
server1.worldofglider.de
Intel? Core? i7-920 Quad-Core
inkl. Hyper-Threading-Technologie
Arbeitsspeicher 8 GB DDR3 RAM
Festplatten 2 x 750 GB SATA-II HDD (Software-RAID 1)
Netzwerkkarte 1 GBit OnBoard mit 100 MBit-Anbindung
Backup Space100 GB
Traffic Unlimited

server2.worldofglider.de
Intel? Core? i7-920 Quad-Core
inkl. Hyper-Threading-Technologie
Arbeitsspeicher 8 GB DDR3 RAM
Festplatten 2 x 750 GB SATA-II HDD (Software-RAID 1)
Netzwerkkarte 1 GBit OnBoard mit 100 MBit-Anbindung
Backup Space100 GB
Traffic Unlimited

Because i just have 2 server to load balance some of the servers need to do the apache thing + load balancer.

My idea was installing load balancer on server1 on port 80 and http on port 81. Is that possible?

Now i have one problem, the load balancer dont seem to pass (the right?) vhost to http server1 or 2.

Thats my load balancer config:


NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /home/load-balancer
ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /LB !
ProxyPass / balancer://mycluster/ stickysession=1 nofailover=On
ProxyPassReverse / http://server1.worldofglider.de/
ProxyPassReverse / http://server2.worldofglider.de:81/
<Proxy balancer://mycluster>
BalancerMember http://server1.worldofglider.de route=server1
BalancerMember http://server2.worldofglider.de:81 route=server2
ProxySet lbmethod=byrequests
</Proxy>
<Location /LB>
SetHandler balancer-manager
Order deny,allow
Allow from all
</Location>
</VirtualHost>


Thats how i installed the vHosts on port 81:

<VirtualHost *:81>
RewriteEngine On
RewriteRule .* - [CO=BALANCEID:balancer.server2:.worldofglider.de]
ServerAdmin webmaster@localhost
ServerName www.fairplay-bot.de
ServerAlias fairplay-bot.de
DocumentRoot /home/ftp/fairplay-bot.de/
</VirtualHost>


Someone has an idea why my vhosts not working? Also i have another question, i installed rsync to sync server2 with server1, but what happens when some user create content on server2? How i can pass this to server 1?

Maybe i could get some help from the big board owners, if i posted in the wrong section im really sorry.

Thanks for any help!