An IP packet contains a payload, such as HTTP information, which in turn contains html information. An IP packet is encapsulated into a TCP segment, which detects problems in transmission over networks, requests retransmission of lost data, rearranges out-of-order data, and helps minimize network congestion. The way this is done is the TCP receiver responds with an ack message as it receives data. The sender maintains a timer from when the packet was sent, and retransmits a packet if the timer expires before the message has been acknowledged.
The process of where the TCP sender sends its initial request to when the TCP receiver receives its last segment and rearranges the data, is this all done in a single TCP connection? Or are multiple TCP connections required for each transmission and acknowledgement?
The reason why I ask is because apache2 has a declarative called KeepAlive. I don't fully understand it. if set to "On",KeepAlive will allow each connection to remain open to handle multiple requests from the same client. But won't each connection already remain open until the TCP receiver receives the entire message, which could be an entire html document?