Reputation: 477
I am using two Tomcat webserver in different server with clustering. And both the server configured in HA-Proxy. So i deployed my application in both the servers. In my application am using atmosphere(WebSocket). So i need to configure this atmosphere in haproxy as well so please help me to do so #thanks
Issue is i am accessing my application in two systems. now pushing is happening in only one server. it should push both the servers. but its not happening....
Upvotes: 0
Views: 283
Reputation: 1282
Normally with a proxy web service, you push a request from the client to the proxy, it then pushes to a server in the pool, which replies to the proxy, which will send the reply back to the original client. Normally, the proxy then maintains a connection history list, so that subsequent connection from the same client, end up at the same server.
The important bit, is that with a proxy, the conversation between client and proxy, and between proxy and server are separate, but the proxy understands the application layer enough to make the client think it's the server.
If you want to use a direct websocket connection between client and server, then presumably you're not using an application layer that a conventional proxy will understand, hence you'll struggle with an out-of-the-box proxy server, like haproxy, as most examples will involve a http connection. However haproxy can do non-http proxying. http://www.linickx.com/load-balance-anything-with-haproxy
That said, Marc B is probably right, and this should be a discussion on serverfault.com, as the programmatic solution, of adding code to the server application, to connect back to the client, is probably the wrong one, as I presume they'll be using a browser, and not a client you have control over.
Upvotes: 1