From f3f64db927154fe8ba09810da40f05f752b972b0 Mon Sep 17 00:00:00 2001 From: Lukasz Jachym Date: Sun, 12 May 2024 16:26:02 +0200 Subject: [PATCH] adds: docs on max UDP size --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dbeaced..a443b8c 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,12 @@ async def main(): ## Additional notes -Seems like finalized string needs to fit UDP packet. Packet size can change and it depends on the network. Worst case is 512 bytes AFAIK. I'll try to elaborate on that in the README. I decided it's better to issue warning than to halt whole system. +By default, `UDPClient` uses max UDP packet size of 512 bytes in order to make sure that it's not going to be fragmented. You can adjust this value by following advice from [statsd spec](https://github.com/statsd/statsd/blob/master/docs/metric_types.md) + +> Fast Ethernet (1432) - This is most likely for Intranets. +> Gigabit Ethernet (8932) - Jumbo frames can make use of this feature much more efficient. +> Commodity Internet (512) - If you are routing over the internet a value in this range will be reasonable. You might be able to go higher, but you are at the mercy of all the hops in your route. +> (These payload numbers take into account the maximum IP + UDP header sizes) ## References