0

There are many questions that address the issue of failover and Im a bit overwhelmed which is why I am asking about my specific situation here.

my setup is as follows:

  1. I have three servers running ubuntu linux 16.04. all three have their own fixed IP's.

  2. In august one of the servers will be hosting a website with a large backend mysql database. Users (on the order of 500-1000) will be continuously logging entries in the database mostly during the day hours say 8am-8pm. Administrators will be querying the database for various statistics.

  3. the website and database need to be operational at all times so Id like to use a second server to mirror everything on the first and take over should the first go down (failover). I can use the third if needed to monitor the response of the two.

I don't really know where to begin. My main questions are

  1. How to keep a large mysql database synced on two separate machines? the database will be large (perhaps 5-10Gb) so it will take time to output and rebuild the database from the .sql file. If disaster strikes im ok losing 10 minutes of logging and uptime but not hours to rebuild the database on the other server from the sql file.

  2. How to have the second server take over if the first goes down? Do I monitor the activity of the two with a third server and switch IPs if the primary server goes down? If so some detailed steps would be appreciated. Ive seen this questions address with jargon like "heartbeats" and "virtual IPs" which is a little too abstract for me. I need as much detail as possible and if this is beyond my expertise I need to find that out so I can let my boss know in time.

thanks for assistance

2
  • 2
    Google "mysql replication", and you'll have more information than you'd ever need.
    – EEAA
    Apr 30, 2017 at 18:47
  • 3
    Additionally, requests for tutorials are off-topic here. If you need that level of help, you should consider hiring an expert in the field to help you.
    – EEAA
    Apr 30, 2017 at 18:48

2 Answers 2

0

Mysql Replication solves these problems quite nicely, even for geographical distributed databases.

In your scenario you may also want to consider writing to the master database only and reading only from replication slaves, this could improve peeformance

3

Agree with the previous answer, mysql replication can be a possible solution.

Also, you can create shared storage between some of your servers, and place the VM with the database on it, thus it will migrate between the servers if something will happen. For this scenario use something like HPE VSA or StarWind. They have free versions as well.

It will allow you to create VMs for any of your production scenarios and be sure that all your data is replicated between the servers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .