Welcome! Log In Create A New Profile

Advanced

Re: Need help: websocket proxy stops working after a while

Maxim Dounin
April 04, 2014 06:38AM
Hello!

On Fri, Apr 04, 2014 at 04:20:04AM -0400, phil3361 wrote:

> Hi all,
>
> The WebSocket protocol specification (RFC 6455) defines a _protocol_level_
> keep alive fonctionnality (the protocol defines both a 'ping' and a 'pong'
> frame).
>
> Unfortunately, it seems that nginx doesn't take these frames into account to
> reset its timeout watchdog timer so far... so that you have to implement
> some _application_level_ heartbeat mecanism if you don't want your WebSocket
> connection be broken by an intermediate nginx on low activity periods...
>
> This is ennoying: such application work has a quite heavy resource cost,
> especially on the server side. This looses some of the most valuable
> benefits of a WebSocket connection: maintaining an active asynchronous
> notification channel from the server to the client, just in case...

You are understanding it wrong.

Any ping/pong frame, as well as any other frame in a proxied
websocket connection, will reset nginx timeouts. Note that first
my response suggests "periodic ping frames from the backend" as
one of the possible solutions.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Need help: websocket proxy stops working after a while

Alder Network June 03, 2013 06:26PM

Re: Need help: websocket proxy stops working after a while

Maxim Dounin June 04, 2013 06:46AM

Re: Need help: websocket proxy stops working after a while

Alder Network June 07, 2013 05:56PM

Re: Need help: websocket proxy stops working after a while

phil3361 April 04, 2014 04:20AM

Re: Need help: websocket proxy stops working after a while

Maxim Dounin April 04, 2014 06:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 286
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready