摘要 |
Disclosed is a Bai Yang messaging port switch service (BYPSS), comprising: a server cluster and a client cluster. The server cluster selects a main node in a current cluster by means of a majority algorithm, and ensures the main node remains unique during a specified period by means of a leasing format. The client cluster includes various client nodes needing to use the Bai Yang messaging port switch service, and each client node may respectively establish a connection with the main node according to requirements. The client nodes identify themselves within the server cluster by means of unique node IDs. The present invention is a message routing service integrating distributed coordination functions such as fault detection, service selection, service discovery and distributed locking. By sacrificing reliability in extreme conditions, the present invention achieves high performance, capacity and concurrency while ensuring strong consistency, high availability and scalability (scale-out). |