scalecube / scalecube-cluster

ScaleCube Cluster is a lightweight Java VM implementation of SWIM: Scalable Weakly-consistent Infection-style Process Group Membership Protocol. features cluster membership, failure detection, and gossip protocol library.
http://scalecube.github.io/
Apache License 2.0
263 stars 88 forks source link

Ordering #366

Closed asad-awadia closed 3 years ago

asad-awadia commented 3 years ago
  1. Are they messages to other members sent using TCP or UDP?
  2. What kind of ordering guarantees are made on the messages sent to other members?

Is it whatever guarantees the protocol from q1 gives?

asad-awadia commented 3 years ago

@artem-v

ronenhamias commented 3 years ago

@asad-awadia scalecube-cluster is a swim and gossip cluster discovery component and have in place algo to very reliably discover nodes status in the cluster with much faster detection and consistency then heartbeating by that avoiding relaying on the TCP and network reliability. by this allowing managing large clusters in more consistent way with no split-brain scenarios and long timeouts and partial inconsistent state when network has issues and yes network always have issues. the algo does no relay on the underline protocol rather as a mean to pass messages between nodes. so the technique of passing the message is not the key point of what scalecube cluster is doing. as such ordering in the scope of the algo is not important rather the distributed state of the cluster as a whole.

  1. messages are sent over TCP there is two types of communication between members a. point to point message direct sending and this have the guarantee of orders via the TCP protocol only. b. gossip spread message passing and this has no ordering or time guarantee at all as gossips are infection protocol.

so yes the guarantee is what the protocol and the algo gives only there is no persistency or determinizem in place as the communication is mainly for detecting nodes in a cluster and understanding the status of the cluster.

for point to point fast communication there is scalecube-services that uses scalecube cluster for discovery of nodes in the cluster and route messages to service endpoints.

asad-awadia commented 3 years ago

Ok got it !