BOSH In Cluster Mode

Subir Jolly
Added about 5 years ago


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:

If bosh is not supported in clustering mode, then how can we make sure we connect to the same server everytime for the users?



Replies (3)

Added by Subir Jolly about 5 years ago

In this post, it's mentioned that bosh clustering is supported:

I am not sure which one to go by.

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 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 -

Added by Subir Jolly about 5 years ago

Thank you so much for your response. We resolved this issue. We solved it by persisting connections between the load-balancer and tigase server. We set the connection to persist for 5 minutes which is more than enough for a connection for a client.