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 functionality to handle socket creation errors with "delayed" retries #41

Open
ichekrygin opened this issue May 9, 2017 · 0 comments

Comments

@ichekrygin
Copy link

When running in distributed container environments (Kubernetes) resolving connection to statsd service may not always be successful, due to various reasons (outdated or lagging iptables is one of many). The current implementation does not provide good handling for such edge-case. While consumer of the client library can "re-dial" the socket connection, it has no control over metrics functionality (bar overloading send methods)
It would be very helpful if client library could "handle" this edge-case periodically retry socket connection while dropping current metrics.

Use-case:

  1. Client attempts to open socket and receives dial TCP/UDP error
  2. Client has the option to log error and continue
  3. On every send invocation, client will attempt to reconnect if connection is nil

Expected outcomes:

A. socket creation is successful upon initial socket creation (current model)
B. socket creation failed upon initial attempt, however, subsequently succeeds. Impact: loss of metrics until the socket is re-dialled.
C. socket creation failed upon initial and on all successive attempts. Impact: loss of all metrics.

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