So, I was going through TCP stuff when I came across Nagle's algorithm and delayed ACKs for small sized packets (1 byte data). The reason being, avoiding to send lot of small packets on the network (Nagle) and piggybacking data(Delayed ACK). There was however, no mention about these algorithms for bulk data, i.e I do a write of > 8000 bytes. 4 questions:
Is these algorithms only applicable for small sized packets?
For ex, when we do a write(8000), TCP first sends 1500 bytes (Assume 1500 to be MSS and slow start is happening) , before an ACK is received for the first, it can send another 1500 bytes of data, then isn't violating Nagle's?
Does the receiver wait for the timeout to send a delayed ACK or does it send immediately after receiving 1500 bytes of data?
How does it know when to delay an ACK? Is it based on the bytes in its receive buffer?
Thanks!