BOSH In Cluster Mode
I am trying to figure out why I am unable to use BOSH in clustered mode. So, here's the architecture we have.
1 HAProxy - Round Robin
2 Tigase Servers - Clustered
When I have 1 user on server 1 and the other user on server 2 and I try to send a message to another user from one user.. The sender gets disconnected. I noticed this line in the logs: INFO: "There is no session with given SID. Closing invalid connection".
Then I saw your post: http://www.tigase.org/content/tigase-bosh-clustering-52
If bosh is not supported in clustering mode, then how can we make sure we connect to the same server everytime for the users?
Added by Andrzej Wójcik about 5 years ago
BOSH component is prepared to work in clustered mode but it is up to a XMPP client library or proxy (ie. load balancer) to ensure that requests of same BOSH session will be directed to the same node of a cluster. Currently there is one more article about connecting from a web browser to Tigase XMPP Server using BOSH or WebSocket protocol, which describes how to use them also in clustered mode - http://www.tigase.org/content/best-practices-connecting-web-browser-tigase-xmpp-server