how nginx handle websocket proxying

Sergey Kandaurov pluknet at nginx.com
Thu Nov 26 12:23:30 UTC 2020


> On 26 Nov 2020, at 12:03, allenhe <nginx-forum at forum.nginx.org> wrote:
> 
> Can someone elaborate this a little bit?
> "NGINX supports WebSocket by allowing a tunnel to be set up between both
> client and back-end servers."
> 
> what is the "tunnel" here? 

After upgrading HTTP/1.1 to WebSocket protocol,
a two-way communication channel is established,
which is proxied by nginx is a special mode.

> Does it mean the client will talk with the back-end server directly after
> the http Upgrade handshakes?

No, WebSocket protocol messages are still proxied by nginx.
See also http://nginx.org/en/docs/http/websocket.html

-- 
Sergey Kandaurov



More information about the nginx mailing list