0

I'm developing a server application that accepts incoming connections and works with client applications. The customer wants to have two machines working: in case one goes offline, the second will back it up. The administrator of the machine (whom I almost don't interact with) came up with the load-balancing solution: there will be two identical server machines, each running the server process independently, and there will also be a load-balancer machine which will scatter incoming connections between the two working machines.

I have to note here that I'm not very familiar with the topic. I think, that load balancing makes sense with the website (which is also part of the setup that my server is a part of), but my server is not request-based: it maintains sessions and associated data in its heap memory and exchanges session- and state-specific data with the clients (who stay connected all the time). So if one machine goes down and the balancer switches the client to the other machine, that other machine will not be able to continue working with that client without the missing runtime data.

But the administrator told me that it is possible to have a synchronization between machines such that two processes running on two different machines will somehow have the same data without me having to implement anything. That seems to be a fascinating technology and I would like to get familiar with it, but I couldn't find which packages can do that or even how that technology is called. I encountered references to Linux HA several times, but I'm not sure that's what I'm looking for.

The OS is Linux-based, but I am more interested in general concepts rather than installing something myself, so packages or manuals for any system would be of interest.

0

3 Answers 3

0

There is no "magic bullet" here. You need to design your application in such a way that there is no application state kept locally that is not synchronized elsewhere.

Look into using something like memcached or redis (hosted on its own server) for maintaining session state, in place of what you are using local heap memory for.

With regards to what the "administrator" says about synchronization, the only thing close to that I've seen is VMware's Fault Tolerant (FT) mode. With this, a hot slave of an entire virtual machine is kept on a separate physical box. There are many restrictions to this setup, though, and it is not a load balancing solution, as only one of the copies of the VM are "active" at any one time.

2
  • My doubts about the magic bullet were dismissed since the wizard says it is there :) But I admit, I'm not very familiar with this topic. I didn't know about VMware's solution, and this is very close indeed. Very interesting too. Commented Sep 1, 2014 at 17:18
  • It's impossible to check a negative answer, but I think this is the ultimate one now. Thank you all for the answers, I'd vote the other one too if I wasn't disallowed to for some whimsical reason. Commented Sep 2, 2014 at 17:27
0

If you're looking at out of the box solutions you should look at utilising Amazon Web Services (AWS). Their Elastic Beanstalk environment is a great way to deploy your code simultaneously across multiple machines behind a configurable load balancer (http://aws.amazon.com/elasticbeanstalk/).

Else look into NGINX or Apache with multiple upstream servers.

1
  • Elastic Beanstalk is a decent tool, but it doesn't absolve you from needing to design your application with load balancing in mind, which is precisely what the OP needs to do. Commented Sep 1, 2014 at 15:14
0

The issue and idea is not 100% understood by the admin or you.
There are two solutions: "High Availability" and "LoadBalancing"
These two solutions are different by nature!
In the case of putting two application servers behind a LoadBalancing solution you will still have one point of failure to the application servers which is the load balancer.
In the case you need a solution for "High Availability" you need to operate two machines while one is sitting there for a case of problems with the other one.
For HA you can use basic Pacemaker which allows one server to identify if the other is up or down based on all sort of options.
You should be aware of STONITH which gives you the option to prevent one server disrupting the other one in couple cases.
Take a look at: Pacemaker

Also don't forget that there is an option for doing it all together using multiple load balancers and multiple application servers in a mesh structure.

1
  • Thank you for the link. There is a mistype above, it should be STONITH, I think. Commented Sep 1, 2014 at 16:51

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.