I'm a web developer who is pretty new to the industry. I was presented with a coding challenge for a job interview where I need to design a messaging system and architect a system for how it deals with messages, malformed messages, different message types, status logging, et cetera...
My question is regarding packet size over TCP.
Incoming messages are at a rate of 10,000 messages/sec at a size of 2KB per message. I've been trying to find the max, max-safe, or max-practical packet size limitation. I've seen in several unverified places (i.e. not in technical documentation) that the max theoretical size is 64KB. Is that correct? In that case my example of sending 2KB messages would easily fit into a single packet and reduce the complexity of this system.
If 64KB is an incorrect number, what would the correct number be? Additionally, I'm not simply trying to understand the max theoretical size but the max practical size. I want to cover edge cases where messages may be slightly larger than the targeted 2KB as well as leave room for the various headers that TCP needs.