You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by hydn79 <ha...@pinstack.com> on 2007/04/28 19:18:23 UTC
[users@httpd] Running one website via two apache running boxes (windows)
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.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?
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 on
it but don't know how to connect the two.
I've spent the last two days searching and experimenting all over the web
then I fond this place today and decided to give it a go. Thanks all.
Thanks,
--
View this message in context: http://www.nabble.com/Running-one-website-via-two-apache-running-boxes-%28windows%29-tf3662849.html#a10234778
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Running one website via two apache running boxes
(windows)
Posted by hydn79 <ha...@pinstack.com>.
Ok here's what I've done so far:
I've added the A record images.mydomain.com to the IP 123.123.123.2 (Server
2)
90% of my images are located:
mydomain.com/images
subfolder.mydomain.com/images1/
subfolder.mydomain.com/images2/
I guess I need to tell the server to send those request to:
images.mydomain.com
images.mydomain.com/images1/
images.mydomain.com/images2/
Correct?
If so, how do I go about that?
Thanks
--
View this message in context: http://www.nabble.com/Running-one-website-via-two-apache-running-boxes-%28windows%29-tf3662849.html#a10243357
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Running one website via two apache running boxes
(windows)
Posted by hydn79 <ha...@pinstack.com>.
I think I'll try this:
> 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.
I want to send all request for images to the server to the 2nd server.
I will still need to add the 2nd server's ip to the A record for the domain
correct?
Also, if the IP's are 123.123.123.1 (Server A web server) 123.123.123.2
(Server B - images server)
How would I tell request to go to server B for images? (I've already copied
the images to the htdocs folder on server B)
Also when users upload images (they get written to server A so how do they
stay sync'd with Server B)?
--
View this message in context: http://www.nabble.com/Running-one-website-via-two-apache-running-boxes-%28windows%29-tf3662849.html#a10243300
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Running one website via two apache running boxes (windows)
Posted by Steve Swift <st...@gmail.com>.
If you're prepared to go the route of Option 2, a new PC with dual
processors and a faster disc get's you to the same performance without all
the rigmarole of mirroring the data. You can avoid the single point of
failure (at least hardware wise) by going with a system using dual power
supplies, RAID disc and physically separate processors, but now
we'restarting to talk a few thousand dollars/pounds.
Option 2 will cost you an extra box, and introduce a new single point
> of failure.
>
--
Steve Swift
http://www.swiftys.org.uk
Re: [users@httpd] Running one website via two apache running boxes (windows)
Posted by Sander Temme <sc...@apache.org>.
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.2
>
> What 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 servers
Option 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 on
> it 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@apache.org
PGP FP: 51B4 8727 466A 0BC3 69F4 B7B8 B2BE BC40 1529 24AF