Cluster Mode - Contact node location

2 posts / 0 new
Last post
Cluster Mode - Contact node location

If I have nodes A and B for a single domain, and user1 is connected to A and user2 is connected to B, when A wants to send out presence probes on behalf of user1 for user2, how does it know user2 is likely connected to B?

Also in the case that user2 is connected via more than 1 resource, how does A know which nodes to send presence probes to for user2?

I'm curious on Tigase's implementation of clustering in this fashion.

Tigase offers something we call: "Pluggable clustering strategies". This means you can have own clustering strategy optimising traffic inside the Tigase cluster and deciding where to send certain packets.
This is very helpful because, for large installations with millions of online users specific optimisations do really matter and help a lot.

After this short introduction, back to your question. How the cluster knows where is a user connected depends on the strategy. Some strategies exchange such information among all nodes, so the cluster just knows. This of course cause increased memory usage as well as some complexity related to keeping nodes in sync.
Some other strategies does not share any information, so no extra memory is used and they simply either send all packets to all nodes or distribute users among nodes based on some hashing algorithm.