packet fragmentation
Data written as one message arriving split over several reads, or several messages arriving glued together in one read.
In more detail
It happens because networks deliver data in packets and TCP only promises bytes in order, not boundaries. Parsers must therefore handle any split, which is what framing solves.
Related terms
- framing — The rule that marks where one message or record ends and the next begins in a stream of bytes.
- maximum transmission unit — The largest packet a network link can carry in one piece, commonly 1500 bytes on Ethernet.
- packet — A chunk of data with a header giving its source and destination addresses, which the network routes independently towards its destination.
Taught in
- Transform Streams: Custom Packet Decoding & Codecs — Node.js Internals & Backend Services