Originally posted by: MrEgo
Ever since I've started reading this forum, I've come to realize that spidey is the man when it comes to networking.
With that being said, what does the TCP window do exactly? A few years ago, before I got DSL, I was getting insanely horrible latency when I subscribed to AT&T broadband cable, and the tech support guy recommended that I increase my TCP window. It didn't seem to help, but why would he recommend that?
There's tons of good resources on dslreports.com (I think that's the name of the site, don't really go there).
To really understand what is going on takes a whiteboard and a lot of math. To put it simply:
TCP window size is the amout of data that can be sent from the TCP sender to the Receiver before an acknoldgement must be sent from the receiver.
1) Hi server, I want some stuffs
2) Hello client, I want to give you some stuffs, I've got a whole warehouse full of containers ready for shipment, I can send 800 thousand bytes of stuff (window size) but they'll be in smaller 1500 byte containers without you giving me a phone call that says you missed a shipment or that container somehow got lost. Once I've sent the full 800 thousand bytes of stuff, I expect a phone call to confirm you got it all.
3) Cool, I can receive 800 thousand bytes of stuff and I agree on the container size (max segment size)
This is all that is needed for the TCP 3-way handshake. 3 packets. Bing, Bang, Boom.
The complicated part is what TCP does based on statistics from the shipment of these containers - that's where the math comes in.
What does this have to do with latency? Let's say you talk to server and say you can only handle 8 thousand bytes at a time before you have to phone him? So in the original scenario you have to pick up the phone, call the server, say "hey, I got your measely 8 thousand bytes, keep it coming and why in the world am I calling you when your delivery is just fine? Just gimme more and I'll let you know when I've had enough. This whole acknoldgement thing is getting out of hand and causing us to not more data efficently. It's wasting time. Throughput is data/time."