Project

General

Profile

BOSH In Cluster Mode

Subir Jolly
Added about 5 years ago

Guys,

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?

Thanks,

Subir


Replies (3)

Added by Subir Jolly about 5 years ago

In this post, it's mentioned that bosh clustering is supported: http://www.tigase.org/content/clustering-and-bosh

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 - http://www.tigase.org/content/best-practices-connecting-web-browser-tigase-xmpp-server

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.

    (1-3/3)