What is one of the most reliable means to arrangement a linux internet server for hand-operated failover

I presently carry out a tiny internet server running ubuntu linux with apache, mysql, and also ssh. I'm backing it up making use of rsync to an additional web server, yet I'm backing it approximately a/ backup directory site.

I would certainly such as to have it set up where if the first web server drops I can transform the ip of the 2nd web server and also have all the customers, documents, data sources and so on all set to go.

Does any person have any kind of pointers on the most convenient/ ideal means to deal with this?

Factors to consider

  • Customers
  • Data sources
  • Apache Configuration
  • Documents
  • Seeing to it the very same software program is mounted on both boxes. (possibly require to do this in advance)
0
2019-05-04 00:06:13
Source Share
Answers: 3

You can make use of rsync or drbd to maintain your back-up web server in sync, or place your information using nfs from a 3rd web server. If you intend to maintain it straightforward, I would certainly support to the very same directory site areas on the back-up web server as the resource web server.

heartbeat2 is an excellent remedy for taking care of the IP addresses and also gives devices for automated or hand-operated failover - and also thinks about arp cache flushing and also various other points that I would not have actually considered.

0
2019-05-12 02:06:27
Source

For documents based solutions (an internet server etc) rsync can properly maintain the 2nd web server approximately day - (customers, configs etc) - when it involves data sources points get a little bit extra intricate (I've made use of MySQL and also a servant web server for this and also it was really reliable, I've additionally made use of PostgreSQL in a couple of HA/standby arrangements yet it was way extra awkward)

This, incorporated with a little IP burglary (a fast manuscript to assign the IP of the fallen short equipment to the user interface of the backup equipment) can create a reasonably straighforward arrangement yet permit fast recuperation.

Simply one point to take into consideration - beware of the failback. Relocating solutions to a backup equipment is one point, relocating them back as soon as you've dealt with the failing can get hirsute, pay attention to the data sources.

LinuxHA is a (rather heavyweight) strategy to this if you determine to make it a little bit extra computerized

http://www.linux-ha.org/

0
2019-05-10 15:23:21
Source

Virtualisation can aid below. You can have 2 web servers running as host web servers, both with a solitary digital web server all set to go. The real-time web server has the digital web server running, while the back-up web server has it's digital web server "switched off" yet can still access the documents system of that web server.

After that you can do normal rsyncs from the real-time digital web server to the back-up digital web server. If the real-time web server drops, you simply require to start the back-up digital web server.

The information rely on which virtualisation software program you make use of (I've done this with linux - vserver prior to), yet some vital factors are :

  • you will certainly require to exclude some setups - IP address specifically.
  • examination your set up when points are functioning - you require to recognize it functions
  • have actually DNS set up for both eg www1.mysite.com and also www2.mysite.com with www.mysite.com being a round robin for www1 and also www2
  • you can also check into some type of heart beat solution to instantly start the back-up web server, yet that might be extremely intricate unless downtime is actually pricey.
0
2019-05-08 09:33:59
Source