IP/UDP based packet. The heart-beating signal is an active signal. When running, the MNCS will broadcast periodic heart-beating signal at a t time intervals to the network. The heart-beating interval t can be set within 5-300 s according to the application's need, or as the multiple of the value which is calculated using the following formula: t=2*network diameter*measured average hop-to-hop delay (including the hop-to-hop transmission delay and the processing delay on a node).
The reflective signal is also an IP/UDP based packet. The reflective signal is a passive signal. The SNCS sends the reflective signal to MNCS only when receiving a heart-beating signal from the MNCS. Both the heart-beating signal and the reflective signal contain instant performance parameters of that server when the signal is sending. Such as the number of loaded clients Wλ, the CPU utility ratio Pλ, the memory utility ratio Mλ, the virtual memory unitization ratio Gλ, the I/O traffic to bandwidth ratio of the server P/T, or the function values relate to these parameters. The server loads could be timely monitored through these parameters.
The contesting signal is another IP/UDP based packet used in upgrading of SNCS to MNCS.
Servers in a connected network could be self-organized into a server cluster according to the following steps:
The server after starting-up runs a process listening to messages sent by other servers, including the heart-beating signal, the reflective signal, the contesting signal, and the collision indication/ACK signal. The process is mainly responsible for the interaction between servers;
If the server has not received any heart-beating signal from other servers in a time interval of 2t-5t, it will consider itself as the MNCS in the cluster, the followings will be carried out:
Empty the SNCS list. Empty the Subscriber list. Add itself as a node to the BMRT. Broadcast the heart-beating signal to the network in every interval of t. Start the process of listening to the booting and application requests from clients. Go to step4.
Else consider itself as a SNCS, and perform orderly the followings: Initialize the Subscriber list. Start the process of listening to the booting and application requests from clients. Go to step4.
The adaptive adjustment to the server cluster is as follows:
As for the MNCS:
When receiving a reflective signal from a SNCS, the MNCS adds it into the cluster, and adds the SNCS into the BMRT and the SNCS list.
By checking the timestamp in the list of SNCS node, if the MNCS has not received any reflective signal from a SNCS for a time interval of T0=2t-5t, then the heart-beating signal will be resent to SNCS in a end-to-end manner in every time interval of Tn=T−*1/Nn, until its reflective signal is received. During this process, N0=2, Nn=Nn-1+1, and Nn<=Nmax. Nmax is the user-defined maximum number of attempts. If the MNCS has not received any reflective signal from the SNCS after Nmax times of resending, then it will consider that this SNCS is unavailable in the cluster, the cluster relations will be thus updated correspondingly. Practically, all clients bounded to the server will be released, that is, SNCS and its related clients will be deleted from BMRT table and the status of the server will be set as ‘N/A’ in the SNCS list.
As for the SNCS:
A reflective signal will be sent to the MNCS as soon as the SNCS receives the broadcast heart-beating signal.
If the SNCS has not received any heart-beating signal the MNCS that sends out in a time interval of 2t-5t, it will consider that there is no MNCS in this connected network and goes to P1:
A contesting signal is broadcasted.
If the heart-beating signal is received from the MNCS, goes to P2.
Else If the SNCS has not received any contesting signal from other SNCS, it upgrades itself into MNCS and carries out the following: resetting the SNCS list, resetting the BMRT, adding itself into the table, adding related clients' information contained in the current Subscriber list into the BMRT, starting to broadcast heart-beating signal to the network in a time inter