Forum Moderators: phranque
Problem:
server 1 is www.mysite.com with ip 123.123.123.1
server 2 is simply a different ip eg 123.123.123.2
What is the best method to share the load across the two apache servers?
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?
Thanks,
What is the best method to share the load across the two apache servers?
To avoid adding hardware, you can add both IPs to the www record of your domain like google does:
C:\Documents and Settings\athompson>nslookup www.google.com
Server: vnsc-pri.sys.gtei.net
Address: 4.2.2.1
Non-authoritative answer:
Name: www.l.google.com
Addresses: 64.233.161.99, 64.233.161.103, 64.233.161.104, 64.233.161.147
Aliases: www.google.com
There are other ways of doing this, try Load balancing Web server methods [en.wikipedia.org] (Wikipedia)
The wiki link led me to this. Can this be a good solution?:
[fastream.com...]
All the other features it describes(pointing different url requests to different slave servers, etc) are nice, but it just moves your single point of failure from your one web server to your one web load balancer(unless it is itself failoverable, which I did not research enough to confirm or deny).
You didn't mention why you were moving to two servers, which is somewhat important in determining how you should move forward. Is your site using so much bandwidth/processor time that you need to spread the load, or are you looking for general increased availability?
Also, be aware that cookies and sessions don't always play well with multiple servers.
I saw the problem in a past post. And seems the user posted the solution but it was deleted by moderator:
apache hangs cpu 100% utilization many http requests
my apache uses 100% cpu after a while.
How could I help myself?
please see PROBLEM HERE
<snip>
thanks!
[edited by: jdMorgan at 3:50 am (utc) on Nov. 29, 2006]
[edit reason] No URLs, please. See TOS. [/edit]
Any idea what this user did to fix?