tomcucinotta / distwalk

Distributed processing emulation tool
GNU General Public License v3.0
2 stars 4 forks source link

Request-level load-balancing #58

Open deRemo opened 2 weeks ago

deRemo commented 2 weeks ago

As of now, we have connection-based load-balancing only, which is managed either by the OS or by the user, depending on --accept-mode. However, we need request-level / app-level load-balancing to properly simulate microservice-based architectures.

A starting point is the MULTI-FORWARD operation, which spread a request across multiple nodes, and optionally waits for a subset of replies. For this new use-case, we'll an additional operation DISTRIBUTE - I believe that an additional tunable for the FORWARD operation is too much. Indeed, DISTRIBUTE works very similar to a (MULTI-)FORWARD, but picks only one node from within a list of candidates, based on a criterium.

Example:

./dw_client --to :7891 --DISTRIBUTE :7892,:7893,criterion=least-conn -C 100

In this scenario, the forwarding node :7891 has to query for statistics both nodes :7892 and :7893, pick the candidate with the least amount of active connections, and then FORWARD the rest of the command chain

deRemo commented 1 week ago

On hindsight, this issue may be removed, given the complexity for little gain. It's simply easier to rely on a third-party load balancer such as IPVS