Skip to content

Commit

Permalink
adds: docs on max UDP size
Browse files Browse the repository at this point in the history
  • Loading branch information
b1r3k committed May 12, 2024
1 parent 96dc3bb commit f3f64db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f3f64db

Please sign in to comment.