Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

First of all i have to say i'm very very newbie as sysadmin. I'm trying to do someone else's work, and i have almost 0 experience in clustering / load balancing and related stuff.

This is the situation.

I have 4 phisical servers. The wanted configurations would be:

2 replicated Webservers, they are the public interface to access database data 2 replicated MySQL

What i'd like to have is:

1 virtual ip address shared by webservers, with a load balancing for the 2 machines. This ip will be the public ip, pointed by the DNS.

1 virtual ip address shared by mysql, same as above. This one will be the interface used by application's connection.

The servers are on a remote server farm, but they are included in a VLAN.

Is it possible to reach this configuration ? In that case, how ? If not, what would be a good alternative?

Thanks for any hint.

Dario

share|improve this question

3 Answers 3

A few Questions do you want it to be load balanced cause if you have 4 machines 2apache and 2 mysql you get set up a fail over setup such that if one server goes down it will use the other server.And to achive this you can use HeartBeat http://www.linuxjournal.com/article/5862

IF you have a high load you maby have 3 nodes with apache/mysql all replicated and convert 1 of the box's into a dedeicated load balancer.

The most reliable set up is 2 load balancers 3 apache servers 1 strong mysql server and 1 backup through heart beat

more to read

i really liked the guide on howto forge

http://www.howtoforge.com/high_availability_loadbalanced_apache_cluster

share|improve this answer
    
Using a dedicated load balancer i guess is not very safe..if it goes down, everything will be unreachable, right ? A failover is good, but what if i want to split the load between machines ? –  n0cturnal May 26 '11 at 22:54
1  
Thats why i said "The most reliable set up is 2 load balancer...." –  Ludjer May 27 '11 at 0:35

Yes, that is definitely possible.

The main problem you're going to have is deciding how to setup the mysql servers. If they are in master/master replication mode, meaning either server can take writes ,then that solution is fine. But master/master replication is uncommon and it is more likely they are setup in a master/slave situation, meaning writes can only goto the master database. You could setup a load balancer in front of these if you are sure that this load balancer will only be used for READS.

You can still setup a load balancer in front of the two for writes, but it will have to be intelligent enough to always goto the master database as long as its healthy, and only fail to the slave database if the master goes down. At this point you need manual intervention to fix things since the old master won't be getting any new writes.

Setting up this type of system is non-trivial, especially handling the case when the master dies. Good luck.

share|improve this answer

Given your physical limitations, you really could setup 2 load balancer hosts and 2 Apache/MySQL servers. MySQL would need to be in a Master/Master config, but it should be possible. This won't give you great performance on the application side, but does give high availability (assuming the load isn't too high)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.