Subject: [hybi] a question about the redirect of websocket

From: juan li <[email-masked]>
Date: Wed, 15 Feb 2012 23:23:49 +0800

Hi,

   On page 20 of rfc6455, I find this sentence "A data center might
have a server that responds to WebSocket  requests with an appropriate
handshake and then passes the connection to another server to actually
process the data frames". How to do this(A server has completed the
handshake and then passes the connection to another server)?

Thanks.

---

From: Takeshi Yoshino <[email-masked]>
Date: Mon, 20 Feb 2012 15:13:37 +0900

On Thu, Feb 16, 2012 at 00:23, juan li <[email-masked]> wrote:
snip.

> handshake and then passes the connection to another server)?

I think "pass the connection" in the sentence means forwarding everything
following the opening handshake to backends (possibly converted into some
in-data-center protocol) and forwarding data returned from backends to the
client.

---

From: Juan Li <[email-masked]>
Date: Mon, 27 Feb 2012 22:47:22 +0800

Do you mean that the server processing the handshake just acts as the
reverse proxy of the backends?
But that still occupies the resources of the server.It is not the real
redirect during data framing.
2012/2/20 Takeshi Yoshino <[email-masked]>

---

From: John Tamplin <[email-masked]>
Date: Mon, 27 Feb 2012 09:59:03 -0500

> redirect during data framing.

The point is that such things are outside the scope of the WebSocket
protocol.

A large serving environment will likely have some sort of front-end
loadbalancer, which chooses the appropriate server to handle the
connection, handles failover, etc.  That frontend might decompress,
decrypt, and/or demux incoming data (perhaps in specialized hardware)
before passing on the data to the ultimate endpoint.

Regarding "resources of the server", it could be just like a router -- the
packets continue to pass through the router, with it performing some
operation on them, before continuing to the ultimate destination.

That paragraph you refer to just says if the functions of a WebSocket
server is split across machines, the set of physical machines implementing
the WebSocket server protocol is considered the server for the purposes of
the spec.

-- 
John A. Tamplin
Software Engineer (GWT), Google