logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Best way to cluster Apache 2.2.2?
Author
ron



Joined: 30 Jun 2006
Posts: 3

PostPosted: Fri 30 Jun '06 22:30    Post subject: Best way to cluster Apache 2.2.2? Reply with quote

What is the recommended/best way to cluster Apache 2.2.2 in an active/active (load balancing and failover) or active/standby (failover) configuration on Windows Server 2003?
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3094
Location: Hilversum, NL, EU

PostPosted: Fri 30 Jun '06 22:49    Post subject: Reply with quote

Did you looked at mod_proxy_balancer : http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html ?

It is stated there:

The worker is a member of the load balancer, usually a remote host serving one of the supported protocols.

If some workers are disabled, the others will still be scheduled correctly,

Steffen
Back to top
ron



Joined: 30 Jun 2006
Posts: 3

PostPosted: Fri 30 Jun '06 23:46    Post subject: Reply with quote

Thanks for your quick reply!

I looked at mod_proxy_balancer and from what I can tell it performs the same function as mod_jk2. It distributes load from an Apache server to a set of application servers such as JBoss.

I want a configuration where I have two Apache servers (Apache1 and Apache2). If Apache1 goes down, requests will stop going to Apache1 and Apache2 will automatically take on the entire load. I am trying to eliminate any single points of failure.

I don't believe mod_proxy_balancer will accomplish this task.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3094
Location: Hilversum, NL, EU

PostPosted: Sat 01 Jul '06 1:14    Post subject: Reply with quote

What you want is a automatically failover. That looks not easy to me if you have eg. databases , you have to synchronize.

I run a mail server (Surgemail) that mirror's all mail to an other sytem. Surgemail mirrorring allows me to have a continuosly updated live replicate server with mail able to arrive on either server and be read from either server. Failover can be router based or using manual switching of a floating IP address in the event of catastrophic failure of the primary server.


I never looked in to Apache failover. I shall look to it, when I find some I shall inform you.

Maybe someone else has an idea ?


Steffen
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Sat 01 Jul '06 17:31    Post subject: Reply with quote

Well How i see it is:

Apache1 - Apache2

Backend:

MySQL
FileServer

Apache one get databases and files from the back hand and serves them if it does the DNS rediect is initioated to Apache2 withc then takes over.

That looks like what you are looking for.
Back to top
ron



Joined: 30 Jun 2006
Posts: 3

PostPosted: Wed 05 Jul '06 18:02    Post subject: Reply with quote

Jorge wrote:
Well How i see it is:

Apache1 - Apache2

Backend:

MySQL
FileServer

Apache one get databases and files from the back hand and serves them if it does the DNS rediect is initioated to Apache2 withc then takes over.

That looks like what you are looking for.


Thank you for your response.

I had thought of using DNS but I am looking for a highly available solution, where failover is automatic. As the following quote from http://en.wikipedia.org/wiki/Round_robin_DNS states, DNS is not a highly available solution.

"Although very easy to implement, round robin DNS has important drawbacks, such as those inherited from the DNS hierarchy itself and TTL (Time to live) values, which allows for address caching and can be very difficult to manage. Round robin DNS must not be relied upon for service availability. If a service at one of the addresses in the list goes down, the DNS will continue to hand out that address and clients will still attempt to reach the dead service."
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Wed 05 Jul '06 19:15    Post subject: Reply with quote

I had to make a workout a simular plan today:

This is what was choosen:

We'll have a small older server connected to the internet...

It actes as a firewall and blocks everything. accept 80, 81 and 443
On there runs a minimal Apache 2.2 with mod_proxy that forwards to
2 backend servers...
Server 1 will get all dynamic content (php, asp.net, mod_perl, ssi)
Server 2 will get all regular requests

Server 1 has more ram and CPU power than server 2 since #2 will do static only... if Server 1 should die... Server 2 can take over but will come at a small preformance penalty... same for the other way around... with less of an preformance impackts.

Server 3 will host MySQL and the data... Serve 3 will be using RAID 5, and will only accept mysql from the local network 10.0.x.x file are transfured via a NFS Server.

Server 3 will also make nightly backups of the data onto and external WD hdd... that will be swaped out every week... there will be 4 of them.

Also in case of the front end server failing... we can reconfiger the router to push all traffic to Server 1 till the problem is fixed.

This is a quite expensive solution... but will probebly work for you aswel
Back to top
oblius



Joined: 14 Dec 2006
Posts: 1
Location: Grande Prairie

PostPosted: Thu 14 Dec '06 5:43    Post subject: Reply with quote

Jorge wrote:
We'll have a small older server connected to the internet... It actes as a firewall and blocks everything. accept 80, 81 and 443
On there runs a minimal Apache 2.2 with mod_proxy that forwards to
2 backend servers...


Only one problem with this setup. What happens if the small forwarding/firewall server fails? Everything behind it will be useless. Again, you have a single point of failure. Smile
Back to top


Reply to topic   Topic: Best way to cluster Apache 2.2.2? View previous topic :: View next topic
Post new topic   Forum Index -> Apache