S
S
Stas4042015-07-03 21:39:30
Node.js
Stas404, 2015-07-03 21:39:30

Web application architecture with load balancing on the back-end?

Hello.
Guys, we need to improve the architecture - tell me what you can build on.
General scheme: 1892e1b4a2af423e8b519c6187671553.png
Clients have a frontend that constantly sends data using sockets to the main node.js backend.
This backend must communicate with remote servers or virtual machines on the same server (all under linux), select a less loaded machine and send a task there (a task is to execute a script or a console program with the parameters passed and return the result as a string, the execution time of a specific task, and the amount of resources required for it can be arbitrary).
After the task is solved and the result of its solution is transferred back to the main backend, it applies the main application logic to this data, prepares and sends new data to the frontend to all clients.
Request:
Ability to automatically restart remote servers in case of a hang or failure. The ability to cancel tasks at any time (for example, when the main backend receives appropriate instructions from the frontend. The
question is rather closer to administration - I will be grateful for tips and hints on how to do it more competently. Balancers? Queue managers?
Where to dig and who to look at ?
PS: For example, you can imagine that this is a game server with many different games on different topics. Clients send moves to the main backend, where they are distributed among the machines, processed and transmitted back to the main backend, which sends the computer's response move to the clients.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2015-07-04
@liff

It is difficult to answer your question in 2-10 sentences.
Check out the balancing here: www.youtube.com/watch?v=RVfjLTFq1EU , or look for a video on their channel, because maybe the link is a bit wrong.

V
Vasily Pechersky, 2015-07-04
@Vasily_Pechersky

I can say about balancers.
From known to me: Nginx, HAproxy.
Nginx - in reverse proxy mode, it can forward a request for a list of backends according to the list, with priorities, etc.
HAproxy - seems to be more flexible, more settings. I didn't eat it. I only know that he is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question