0

I have 2 openfire servers and an elastic loadbalancer over them and built a gwt application that using http bind at port 7070 when connecting directly to one server it works good but when it connects to the loadbalancer on port 7070 it’s not working and output an error with 404 invalid SID value

Note: When the load balancer is working at tcp mode it works fine but when its http mode it doesn’t work and i need to make a sticky session for it

Mai Tarek
  • 1
  • 2

1 Answers1

0

That's because once BOSH session is established on one machine then it's tied to this machine. Without enabling sticky session on the ELB subsequent requests from the client can be routed to the second server, on which there is no BOSH session that maches the request, which in turn results in invalid SID (because SID doesn't exist on the other machine).

Alternative solution would be (if the machines would also expose public IP) to return "host" information in the BOSH response therefore client could use that information and then make subsequent requests to correct machine. But if that's not possible, they ou have to use "sticky session".

Wojtek
  • 1,845
  • 1
  • 14
  • 33