I'm trying to send a UDP packet to another server to notify it that new information is available. The data in the packet is fairly small, somewhere around 100 bytes, it's basically an event type and a UUID.
I'm aware of the limitations of how much information fits in a single packet (What is the largest Safe UDP Packet Size on the Internet) and it doesn't look like I'll have any issue with that. And I'm aware that UDP packets might get dropped - that's fine in my case, the packet is just a suggestion to optimize how quickly the other server(s) knows about new data, losing the packet will make the application respond slower but will not break things.
With that in mind, my question is how much does it matter what the size of that packet is? If I encode the information as JSON, it looks like it will be about 75-100 bytes. I can also encode the info in a raw binary form which will be much smaller (I can probably fit it in something like 30 bytes or less).
Is a UDP packet with a 100-byte payload going to travel "slower" than a 30-byte payload? I'm aware that each packet has an overhead, but it's not clear to me how much the packet size affects performance if I'm already avoiding fragmentation (which obviously would make things slower and less reliable). Could the size of the payload affect the likelihood of the packet being dropped?
In summary, I'm trying to decide if it's better to make a more cryptic but more compact format, or to go with JSON which will be easier to modify and maintain backward compatibility with as the application evolves, but definitely bigger in terms of the size of each packet.