[CentOS] High availability www+mysql

Ugo Bellavance ugob at camo-route.com
Fri Nov 11 17:59:33 UTC 2005


	I have one physical server (server1 - CentOS 4) and one vmware (server2 
- CentOS running in a VM under Windows 2003).  I'm running PHP/MySQL 
webapps on it.  I want to be sure there is a failover, but I don't 
really need load balancing for now. I run php/mysql/apache with the 
binaries that comes with CentOS 4.

	I have installed heartbeat on both and set MySQL replication so that 
when server1 fails, server2 takes the requests.  Heartbeat signal is 
going through the same NIC than regular traffic, but I'll check if I can 
set serial port or another NIC for that.  Might be more difficult with 
VMWare and my service isn't that critical.

	Now, if server1 is unavailable, server2 takes over.  It should have a 
current copy of the database because of the replication and the files 
are rsynced frequently (php).  I configured heartbeat so that server1 
doesn't take over if it comes back up, since it won't have a current 
copy of the DB.  I'm not sure if I can (and if it is hard to configure) 
do a multiple master config with MySQL 4.1 and I'm not sure if MySQL 
cluster is an appropriate solution either.  I looked at DRDB, but I 
think I would have to resize my partitions, so this is less tempting.

	I'd like to have opinions about my setup and how I could improve it, or 
test it.  The logs issue is a concern, but not that much.  I can live 
without accurate stats for the time I take to get server1 back online.



More information about the CentOS mailing list