Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Apache + MySql load balancing

Posted on 2011-03-18
2
Medium Priority
?
495 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 2000 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

The Ideal Solution for Multi-Display Applications

Check out ATEN’s VS1912 12-Port DP Video Wall Media Player at InfoComm 2017. Kerri describes how easy it is to design creative video walls in asymmetric layouts and schedule detailed playlists ahead of time with its advanced scheduling feature.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

715 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