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 keep-alive mode to ensure pings/pongs are received timely #75

Open
Shane32 opened this issue Sep 24, 2024 · 0 comments
Open

Add keep-alive mode to ensure pings/pongs are received timely #75

Shane32 opened this issue Sep 24, 2024 · 0 comments

Comments

@Shane32
Copy link
Owner

Shane32 commented Sep 24, 2024

  • Need to consider new options and behavior
  • Should provide option to validate that pongs are received under graphql-ws
  • Or maybe should provide option to validate that any packet has been received
  • Need to consider both protocols

Idea (for graphql-ws):

  • Add option/mode to ensure any packet has been received within a specified interval
  • During ping interval, check when last packet rec'd was, and if too long, send ping

Idea (for graphql-ws):

  • Add option to ensure that pongs respond to pings
  • Pings send unique identifier (maybe a timestamp for simplicity)
  • Pongs verify that unique identifier is received within the specified time
  • Note: may not work with client libs if they don't mirror the ping payload

Notes for subscription-transport-ws:

  • 'ka' packet is not a client->server packet
  • 'ka' packets received by the client does not trigger a response
  • Maybe need to be able to disable this protocol to enforce keep-alive behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant