I've got two servers and a program that I want to run on them (NOT necessarily simultaneously). Let's call one server "SA" and the other one "SB". SB is a backup for SA, and I want that while my program is executing on SA, if SA fails then the program will immediately pick up where it left off and continue executing on SB. What is the easiest way I can accomplish this?
Asked
Active
Viewed 33 times
0
-
You will have to provide more information about what this program does, what are its inputs and outputs and what kind of infrastructure you have between servers SA and SB. What you are looking for is making an existing software attain HA (High Availability), which is something that is tightly related to the inner working details of the software itself. Depending of the characteristics of this software, some external solutions may be available, but it may require a complete software redesign. – Pablo Jul 14 '17 at 20:46
-
Well as far as the inputs and outputs, the program reads startup data from a file and then proceeds to send and receive data through sockets. The infrastructure is to be determined (heavily influenced by the outcome of this question). As far as the actual function of the program, it simply receives data through the socket, does some calculations, and then sends the data back out another socket. – Tommy Orok Jul 15 '17 at 00:12
-
Assuming your program is /stateless/, meaning that in order to do its job needs just the startup information from a file, like some configuration information, and then can work with no further storage backend, then [HAproxy](http://www.haproxy.org/) can provide a starting point. This case also assumes that in order to be doing its calculations there is no shared state needed between the instances of the program. If any of these assumptions is wrong, then the complexity of a HA solution grows. – Pablo Jul 15 '17 at 15:15