Skip to content

Periodic reconnect to avoid stale UDP connections#51

Open
Jonnymcc wants to merge 9 commits intoquipo:masterfrom
HBOCodeLabs:periodic-reonnect
Open

Periodic reconnect to avoid stale UDP connections#51
Jonnymcc wants to merge 9 commits intoquipo:masterfrom
HBOCodeLabs:periodic-reonnect

Conversation

@Jonnymcc
Copy link

@Jonnymcc Jonnymcc commented Mar 26, 2018

What?
Allows the client to periodically reconnect to the server.

client := NewStatsdClient(udpAddr.String(), prefix)
client.reconnect = true

Why?
We are using this library within Kubernetes and when our statsd servers get recreated (within Kubernetes) a connection to an old service endpoint results in metrics being emitted via UDP and going nowhere. We believe this is due to conntrack keeping the route open because there is at least one client that is connected to it (the app that implements this library).

@Jonnymcc Jonnymcc closed this Mar 26, 2018
@Jonnymcc Jonnymcc reopened this Apr 4, 2018
@Jonnymcc Jonnymcc force-pushed the periodic-reonnect branch from d2d0c87 to 3a46488 Compare April 4, 2018 15:13
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

Successfully merging this pull request may close these issues.

1 participant