kernicPanel
22.9K views | +0 today
kernicPanel
JavaScript, Node Js, Git, Vim, and more…
Curated by Nicolas Clerc
Your new post is loading...
Your new post is loading...
Rescooped by Nicolas Clerc from nodeJS and Web APIs
Scoop.it!

Websockets load-balancing with HAProxy

Websockets load-balancing with HAProxy | kernicPanel | Scoop.it
HTTP protocol is connection-less and only the client can request information from a server. In any case, a server can contact a client… HTTP is purely half-duplex. Furthermore, a server can answer only one time to a client request.

Some websites or web applications require the server to update client from time to time. There were a few ways to do so:
- the client request the server at a regular interval to check if there is a new information available
- the client send a request to the server and the server answers as soon as he has an information to provide to the client (also known as long time polling)

But those methods have many drawbacks due to HTTP limitation.
So a new protocol has been designed: websockets, which allows a 2 ways communication (full duplex) between a client and a server, over a single TCP connection. Furthermore, websockets re-use the HTTP connection it was initialized on, which means it uses the standard TCP port.
Via Nicolas Weil, Srdjan Strbanovic
more...
No comment yet.
Scooped by Nicolas Clerc
Scoop.it!

Websockets 101 | Armin Ronacher's Thoughts and Writings

Out of curiosity I taught the Fireteam presence server websockets as a protocol in addition to the proprietary protocol it speaks out of the box. I don't really have a usecase for websocket per-se with the server, but I thought it might make it more useful for customers that want to use the event based parts of the API with HTML5 games. This post focuses on implementing websockets on the server, not so much about how you would use them from the client and basically collects all thing I wish I would have known before.

more...
No comment yet.