Load Balance in a Distributed Project

Does anyone know a simple load balancing algorithm (formula) that connects users, CPU utilization, network utilization and memory usage? This will be used to compare different servers and assign a new user the best at the moment. Thanks.

+3
source share
3 answers

If you use Apache Web Server for application proxies, I recommend that you use mod_proxy and mod_proxy_balancer . You can find a brief introduction about mod_proxy here . This is true for Jetty, but it is easily applicable to other servers.

The first thing you need to worry about clustering is a way to handle sessions. You must be sure that the request belonging to the session is directed to the same server (or the session is somehow saved and then always retrieved). Mod_proxy can do this for you.

For the load balancing algorithm, see the mod_proxy_balancer documentation. Accordingly, there are 3 load balancing scheduler algorithms.

An older load balancing solution is mod_jk.

In general, this is not something that I could implement myself, even if I had a better algorithm. It’s better to use an existing solution.

+3
source

Take a look at nginx . Easy to configure, very fast and handle load balancing between servers.

For detailed information, appropriate processing of a distributed session is required (see kgiannakakis).

0
source

Take a look at haproxy . This is an extremely stable and fast HTTP / TCP load downloader used by some websites with extreme traffic.

For detailed information, appropriate processing of a distributed session is required (see kgiannakakis).

0
source

All Articles