jsocol / jsocol/pystatsd

Add a method to re-run DNS lookup

Open
#125 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

semver:minor
Dominant language
Python
Stars
553
Forks
177
PR merge metrics
No merged PRs in 30d

Description

Hello!

In Kubernetes world, where an IP of a host can change often, catching all socket errors is not very helpful.

For example, if the IP of statsd host is changed, the UDP client does not reconnect to this new IP and the only solution to create a new connection with the new IP of the statsd host is to restart the client.

The line with catches all these errors is https://github.com/jsocol/pystatsd/blob/006a86394c44ff71e6e8e52529daa3c0fdcc93fb/statsd/client/udp.py#L45

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in statsd/client/udp.py at the linked line where socket errors are caught, then trace how the UDP client resolves and connects to the StatsD host. Add a way to rerun DNS lookup and use the host's new IP without restarting the client; done means an IP change can be handled through the client itself.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.