sivy/node-statsd — pull request #8 by lloyd (2011-12-14 02:01:39+00:00)
Title: Ephemeral UDP with port reuse

We tested issue #6 (@mojodna's wonderful patch to bind ephemeral UDP ports on demand), under extreme load, and found that resource consumption was very high on certain linuxes when sending lots of UDP traffic.

This is another pull request, built on @mojodna's, that adds a small timeout that leaves ephemerally bound udp ports open and re-uses them when more statsd is invoked more frequently than 1s. Same extreme load looks a *lot* better in terms of file descriptor usage.

The approach was suggested by (again) @mojodna in his pull request.