sandshakimi
asked on
Load Balancing and Fail Over for Linux Web Hosting?
I'm new to Linux administration.
Now: I have one front end web server (Ubuntu Server/Linux) with Apache2 and PHP applications (Drupal). This is "server A".
The MySQL sits on it's own server, housing the content for the websites on "A".
Next: I will be adding a second front end web server, same specs, this will be "server B". I want it to share the same MySQL database as "A"
Goal: I will be hosting high volume public websites on "A". In case "A", fails, I want traffic to go to "B", or vice-versa. The MySQL should feed both, so the two servers are identical always.
So: What's a best practice, and fairly easy approach, to implementing 1) load balancing, 2) DNS rerouting, and 3) server replication and 4) any other considerations?
Please be as detailed as possible. I will be installing all this myself, with little support. So I want to be confident on what has to be done.
Now: I have one front end web server (Ubuntu Server/Linux) with Apache2 and PHP applications (Drupal). This is "server A".
The MySQL sits on it's own server, housing the content for the websites on "A".
Next: I will be adding a second front end web server, same specs, this will be "server B". I want it to share the same MySQL database as "A"
Goal: I will be hosting high volume public websites on "A". In case "A", fails, I want traffic to go to "B", or vice-versa. The MySQL should feed both, so the two servers are identical always.
So: What's a best practice, and fairly easy approach, to implementing 1) load balancing, 2) DNS rerouting, and 3) server replication and 4) any other considerations?
Please be as detailed as possible. I will be installing all this myself, with little support. So I want to be confident on what has to be done.
ASKER
"You could put a dedicated load balancer hardware in front of two web servers."
I come across this approach in my research. But doesn't this create a single point of failure? What if the load balance hardware fails?
What's ucarp?
Is the Dynect solution open-source or costly?
I come across this approach in my research. But doesn't this create a single point of failure? What if the load balance hardware fails?
What's ucarp?
Is the Dynect solution open-source or costly?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
There are couple ways to implement this.
1. You could put a dedicated load balancer hardware in front of two web servers.
2. If you have two servers in the same network pool, you can use ucarp. By using ucarp you can have a floating IP address and it will point to one of the servers, if one goes down, it will automatically switch to another server.
3. DNS Load balancing / failover. This one is easiest to implement. Dynect provides Managed DNS with failover capability and load balancing , with this, you can actually have both servers working at the same time, and if one of the server goes down, it will detect and stop serving that server.
There might be other options too , but these are ones that I think are good choices.
I guess the first step would be to choose one of the options and then move forward.