chating use bosh in cluster mode
I am facing a problem, I use Haproxy to reverse proxy to nodes of tigase cluster(use roundrobin mode) ,and use bosh client to chat with someone. The problem is ,one side can send message,but the other side can not recive message at all, but I stopped one of the nodes,it could work correctly .I wondered that ,it would be session problem,the two nodes did not synchronize the session .How can I solve it? Thank you.
Added by Andrzej Wójcik about 2 years ago
This is a tricky thing. In our Jaxmpp client and Tigase XMPP Server we implemented mechanism which reports to client full name of cluster node to which client got connected and for following BOSH requests client connects directly to this cluster node using it's name.
However if you use BOSH for connections from web browser, I would strongly suggest to use WebSocket instead of BOSH as a WebSocket is usually faster than BOSH and additionally there is a single HTTP connection, so there is no need to route many HTTP connections to the same Tigase XMPP Server cluster node.