elastic / stream

Test utility for streaming data via udp/tcp/tls/webhook/GCP Pub-Sub/Kafka.
https://container-library.elastic.co/r/observability/stream
Apache License 2.0
8 stars 13 forks source link

Rate limit UDP output #11

Closed andrewkroh closed 3 years ago

andrewkroh commented 3 years ago

The UDP output will dump all data as fast as possible. It will overload buffers of the recipient resulting in data loss. The output implementation should have some rate limit that's configurable (e.g. 500 KiB/sec).

There's a TODO here, but that's probably not the correct place for the logic as it would only apply to PCAP.

https://github.com/andrewkroh/stream/blob/7e151a6c712c398d433bc30cb9cd92c0d80959e6/command/pcap.go#L77