Feature #453

enable clusters to exchange information about service number of messages enqueued

Added by Madars over 4 years ago. Updated over 4 years ago.

Status:NewStart date:09/04/2019
Priority:Normal (Code 4)Due date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

as the ndrxd may count the number of messages in service queue.
Ndrxd should back-propogate this information to service shared memory (periodically) and in the same time when exchanging information to other cluster nodes, this shall be included too.
Thus later when tpcall is performed, the caller process shall evaluate all server nodes, to find the node with less queued messages.
But needs to take in account that:

- Nr of message in service Q is not real time infos

In overall the service load balance shall operate with following infos:

- number of server processes on each node
- number of messages in each queue
- and some load balancing attribute, between local and remote, enable/disable? Also maybe we want to configure the mode, for example, when we truly send the messages to node which hash the less messages in queue, or if all the same, then send to the one to which have largest server count. There could be percentage for example how much percent send in this mode, and how much percent of that process in round robin fashion.

From these parameters, there should be decision on which host request shall be sent.

- Also needs to think about how to test this all.

So LDBAL 0...100 -> 0 - all locally / 100 - all remote (remote random select)
LDBAL 101 - 200 - max free node / random select all

So:
0 - process locally;
50 - process 50% locally and 50% on random remote machine;
100 - process all on remote;
101 - Process all request on less busy node/or highest server count;
150 - Process 50 % on less busy node and 50% on random node;
201 - all traffic goes to random select node (same as 100);

- The target node shall be calculated as ratio messages_in_queue / process count. The node with less such ratio would be chosen for the service serving.
- For the local server, administrator shall give some extra weight, for example for local machine the number could be messages_in_queue / process count - NDRX_LDBAL_ARG.

Thus if having
node 1: 100 msg in q / 5 proc = 20
node 1: 50 msg in q / 6 proc = 8.33
node 1: 70 msg in q / 10 proc = 7 (this would be selected as target machine)

When NDRX_LDBAL_ARG would be set to 16, the node target node would be:
node 1: 100 msg in q / 5 proc = 20 - 16 =4 (this would be selected as target machine)
node 1: 50 msg in q / 6 proc = 8.33
node 1: 70 msg in q / 10 proc = 7

Or it could be something like: NDRX_TMNETLOAD, that would add arbitrary number of network load coefficients.

History

#1 Updated by Madars over 4 years ago

  • Description updated (diff)

#2 Updated by Madars over 4 years ago

Also ensure that bridged service in the shared memory will not send the request back to this node, when tpbridge will chose the service to send message to.

#3 Updated by Madars over 4 years ago

  • Description updated (diff)

#4 Updated by Madars over 4 years ago

  • Description updated (diff)

#5 Updated by Madars over 4 years ago

  • Description updated (diff)

Also available in: Atom PDF