organicveggie / metrics-statsd

Statsd reporter for codahale/metrics.
Apache License 2.0
93 stars 80 forks source link

Problems with big UDP packet #19

Open Sytten opened 7 years ago

Sytten commented 7 years ago

This project is probably not maintained anymore, but I though it would be a good idea to write somewhere the trouble I encountered with it (also applicable to the forks who have not changed this behavior).

The UDP sender used by the reporter tries to send all data in the same UDP packet. When you have only a couple of metrics its fine, but when you start to have hundreds of them it becomes problematic. First, the packet is fragmented which by itself is bad in UDP. Second, the packet isn't always processed entirely by statsd. We use hosted graphite, so I don't really know where the problem lies (buffer too small, bad packet reconstruction??), but if you are missing data them I highly suggest you split the data upfront using a wrapper around the reporter.