Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to periodicaly ping idle websockets to keep proxies happy #777

Closed
asvetlov opened this issue Feb 12, 2016 · 7 comments
Closed
Labels

Comments

@asvetlov
Copy link
Member

See tornadoweb/tornado#1640 for explanation

@fafhrd91
Copy link
Member

can we use keep-alive timers for that?

@asvetlov
Copy link
Member Author

So you mean utilizing SO_KEEPALIVE from low-level server.py code?
It's only hop-to-hop setting, proxies don't cope with it.

@fafhrd91 fafhrd91 reopened this Feb 12, 2016
@fafhrd91
Copy link
Member

I thought we have timer for keep alive, but it just ceil on time. Ok, np

@rutsky
Copy link
Member

rutsky commented Dec 18, 2016

What is intended interface and behavior?

Currently WebSocketResponse has only autoping=True parameter which tells to auto-send PONG replies for each received PING message.

Behavior that can implemented for this feature:

  1. WebSocketResponse sends PING messages every ping_interval seconds,
  2. if no PONG messages are received for pong_timeout seconds, WebSocketResponse closes connection.

Should received from client data reset pong_timeout?

What if client doesn't implement PONG sending? His connection will be closed according to described above behavior (which is OK if this behavior is not enabled by default).

Do we need separate option for current autoping=True behavior, or we can put both behaviors under same option?

@asvetlov
Copy link
Member Author

Let me re-read RFC prior to keeping conversation

@fafhrd91
Copy link
Member

fafhrd91 commented Feb 1, 2017

added heartbeat option to client and server web sockets

@fafhrd91 fafhrd91 closed this as completed Feb 1, 2017
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants