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

Keep-alive through use of ping/pong #42

Closed
alexellis opened this Issue Mar 11, 2019 · 2 comments

Comments

Projects
None yet
1 participant
@alexellis
Copy link
Owner

alexellis commented Mar 11, 2019

Expected Behaviour

When there are long periods of inactivity the WS tunnel should remain up.

Current Behaviour

It appears that it sometimes stops responding. I believe this is because we don't have a WS PING/PONG setup in the client/server.

Possible Solution

Implement a ping / pong as per Gorilla examples or as per Rancher's Norman library.

https://github.com/gorilla/websocket/tree/master/examples

https://github.com/rancher/norman/blob/4c3df5a3de57701e5ff57e13b45a3b219b5d9d33/pkg/remotedialer/wsconn.go

Steps to Reproduce (for bugs)

  1. Setup a tunnel to run over night
  2. Test tunnel
  3. Come back in the morning
  4. Test the tunnel again

Context

This could affect reliability for long-running tunnels

Your Environment

Latest version with Linux/Linux client/server

@alexellis alexellis referenced this issue Mar 12, 2019

Merged

Switch from go/flags to spf13/cobra #27

3 of 3 tasks complete

alexellis added a commit that referenced this issue Mar 12, 2019

Initial ping/pong attempt
Attempting to resolve #42

Current behaviour is timing out before the subsequent ping
arrives.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>

alexellis added a commit that referenced this issue Mar 12, 2019

Initial ping/pong attempt
Attempting to resolve #42

Current behaviour is timing out before the subsequent ping
arrives.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>

alexellis added a commit that referenced this issue Mar 12, 2019

Initial ping/pong attempt
Attempting to resolve #42 by sending continual ping from each
client to keep connection alive.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>

alexellis added a commit that referenced this issue Mar 12, 2019

Initial ping/pong attempt
Attempting to resolve #42 by sending continual ping from each
client to keep connection alive.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>

@alexellis alexellis referenced this issue Mar 12, 2019

Merged

Initial ping/pong attempt #47

3 of 4 tasks complete

alexellis added a commit that referenced this issue Mar 12, 2019

Initial ping/pong attempt
Attempting to resolve #42 by sending continual ping from each
client to keep connection alive.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
@alexellis

This comment has been minimized.

Copy link
Owner Author

alexellis commented Mar 12, 2019

/close

@alexellis

This comment has been minimized.

Copy link
Owner Author

alexellis commented Mar 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.