On Apr 28, 2007, at 7:18 PM, hydn79 wrote:
I've mirrored the htdocs to the 2nd server. And they file sync every 15 mins.Problem: server 1 is www.mysite.com with ip 123.123.123.1 server 2 is simply a different ip eg 123.123.123.2What is the best method to share the load across the two apache servers?
Two main approaches: 1) Use round robin DNS to alternately have www.mysite.com resolve to either of your IP addresses 2) Put a load balancer box in front of your serversOption 1 is very easy to implement: just put a second A record for your site in the dns zone configuration. If you're using bind (which most people do), it'll resolve to both in rotation, sending roughly half your users to either server
Option 2 will cost you an extra box, and introduce a new single point of failure.
If you're on Windows Server, you could use NLB
I notice in the apache console there's a button "Connect" where you can"connect to a remote server". Can that be used to access the htdocs on Server 1 by apache web service on server 2?
I'm not familiar with an Apache Console. Perhaps you are using an administration console someone else wrote?
Or even better, suggest the best way to lower some of the load on my web server as the 2nd box (mysql server) is almost idle. I've install apache onit but don't know how to connect the two.
Same as above, assuming the MySQL box can see the net.Alternatively, you may choose to split up your site and have certain portions handled by the MySQL box. For instance, use mod_proxy to send part of your traffic to the back-end, and/or running your application server there.
S. -- Sander Temme sctemme@xxxxxxxxxx PGP FP: 51B4 8727 466A 0BC3 69F4 B7B8 B2BE BC40 1529 24AF
Attachment:
smime.p7s
Description: S/MIME cryptographic signature