when I asked people to explain how UDP works I got a lot of answers to the effect of "it's spray and pray"

but I'm having trouble thinking of examples of UDP-based protocols that actually work in a "spray and pray" way —

* DNS is "send 1 packet, retry if you don't get a reply”
* QUIC is a sophisticated system for streaming data over UDP
* I'd guess that video protocols correct for packet loss
* maybe statsd is a "spray and pray” system?

(please do not reply to this explaining how UDP works)

@b0rk what does "spray and pray" even mean? You won't get things working by praying, instead you have to implement retries or some other strategy to handle packet losses and reordering.
Maybe it makes sense to describe how you implement UDP (if you are writing a network stack, which few people do), but not how you use UDP to implement some networking things?
@pulkomandy @b0rk "you have to implement retries" No, it depends on the application. (If you need to retry, then may be think twice before using UDP.)
@bortzmeyer @b0rk I said "retry or some other strategy", yes? This can be careful timeouts, sending another (updated?) message later, or just thinking about it and deciding that it's not important if the message is lost (but, in that case, do you really need to send it?)
@pulkomandy @b0rk " just thinking about it and deciding that it's not important if the message is lost" This is exactly how real-time video works: you don't retransmit lost pixels, the show must go on.
@b0rk regarding video protocols: typically this will be rtp or rtsp, they both have timestamps in each packet, so the receiâer can know something is missing (and how long the missing part lasts), and also if some packets are arriving too late and should be dropped. There will be no retry/retransmission in these. The complexity is mostly on the receiver side, so you can do multicast (with the sender not having to worry about how each receiver is doing)

@pulkomandy @b0rk tried looking in the other thread, and spray might be sending towards one system, or to various destinations

UDP syslog is spraying towards a logging infrastructure, sometimes resembles a firehose

I have also seen file transfer programs built using UDP just rapidly sending a lot of data, and the at the end filing the missing pieces

The old Ghost for making images onto a classroom of PCs also comes to mind
https://en.m.wikipedia.org/w/index.php?title=Ghost_(disk_utility)&diffonly=true

Ghost (disk utility) - Wikipedia