[go: up one dir, main page]

Skip to content

Logic Behind Client Information Sync #79

Answered by wind-c
RohanDoshi21 asked this question in Q&A
Discussion options

You must be logged in to vote

Each node saves the subscription tree of other nodes (only the subscription not the client, which reduces memory footprint) and generates the corresponding routing table (map[subscription]nodes), subscription data is synchronized between nodes via raft. The logical flow is publish -> local subscription tree -> local subscription tree of the other nodes -> routing table -> grpc to node. The same logic applies to shared subscriptions. The difference is that the shared subscription takes precedence on the local node, and if the local node does not have this shared subscription, it will randomly select the node with the shared subscription to send the message. A non-shared subscription is sen…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RohanDoshi21
Comment options

Answer selected by RohanDoshi21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants