Skip to content

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

Description

@Shane32
  • 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions