Solved

Apache + MySql load balancing

Posted on 2011-03-18
2
492 Views
Last Modified: 2012-06-27
Good Morning,

I am currently looking into viable options for creating a much better network setup (HA) for my apache/mysql servers.

The configuration i am looking into is  two Apache servers and two MySql servers running behind a load balancer

I am just a bit confused on the best methods for keeping both the MySql databases and the Apache servers in sync with each other. I would need both databases to be identical all the time as well as the Apache servers.

For the Apache servers I was considering setting up a Git server to control the versions on each servers as well as pushing updates to each server but I am not sure if this would be the best method.

Any suggestions or help would be greatly appreciated.

Thanks.
0
Comment
Question by:Defunct-Exodus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
matstein earned 500 total points
ID: 35975744
Recently developed a similar system for MySQL. Look into replication if you are only considering two machines to be synced. Each machine should be set up to be the Master AND slave of the other machine. We ran those machines in a production environment for months with no problems.

Another alternative would be a MySQL cluster but only do this if you are thinking of implementing more than two SQL servers otherwise it is overkill.

On the Apache side it depends what kind of content you are looking to synch. The ideal situation in my opinion would be to migrate file data to the database and let replication handle the synch issues. This may require some porting but it will save you a huge headache in the long run. E.G move files/pics etc. to the SQL database and have both sites access them from there.

Other considerations: Replication also means you have redundancy so consider implementing a switchover mechanism on the Apache side should one database fail. Also note should a DB go down it will automatically bring itself back up to speed with the other database once it comes up again.

Potential Hazards: Replication is broken when a database attempts to run a command that it does not have privileges for create a replication user for each database and grant sufficient privileges to each.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question