It's the Latency, Stupid
rescomp.stanford.edu
rescomp.stanford.edu
Skype calls with these latencies are still acceptable. However, there are many websites using SSL without a cache, and causing the overhead time to be 3 times longer (due to much more handshakes).
Unfortunately, Basecamp uses a lot of redirects (3 redirects to a Whiteboard). This means that I have to wait for 2-3 seconds for each page to start loading!
I know light speed is not something we can change, but the key is, don't use SSL unnecessarily. Even if you have to use SSL, try to implement a cache to save users' time.
I believe that many Internet users outside of US are just like me, start to hate HTTPS websites intuitively. To us, they are just much much slower.
Singapore has one of the fastest Internet connections in the world, especially among English-speaking countries (US website visitors). But latency is always a very big problem that many people are not aware of. I'm surprised that this issue was mentioned as far as 15 years ago!
Edit: spelling, expression.
I ask because I'm writing a little API (both server/client) that uses SSL, and just connecting can be brutally long - so I might be doing something wrong here.
# You need to reuse the session, instead of forcing the client to do the full handshake every time.
# You can consider setting a high Keep-Alive value to improve the performance by avoiding long overhead time.
Cache-Control: max-age=<number of seconds>
this way you'll eliminate roundtrip needed for redownload/cache validation.I was part of one of the 1st generation solutions. Everybody was attempting to graft infiniband onto existing IP stacks - which totally blew the latency promise. Every day I had to fight our management about this.
The solution of the day was to provide 'virtual adapter' hardware directly mapped into the application memory space, so transfer latency skipped the kernel switch, memory copy and interrupt processing delays. Which required significant changes to the kernel. Which was easy on Windows, hard on Linux and impossible under SunOS.
But the difference in latency is so big that you have to use different memory transfer strategies when using the GPU for computations than when using the CPU.
Cubic (http://en.wikipedia.org/wiki/CUBIC_TCP) and htcp (http://smakd.potaroo.net/ietf/all-ids/draft-leith-tcp-htcp-0...) are two congestion control methods which avoid this by not increasing the congestion window size by a function of the RTT (and are recommended if doing large data transfers across high capacity links with high RTT). In linux you can typically check your TCP congestion control algorithm by: "sysctl net.ipv4.tcp_congestion_control".
Don't we agree that compression requires processing input data stream in a window, which introduces extra latency?
(of course, overall transfer time may be lowered via compression, and thus compound latency of whole application can be lowered, but that's another matter -- and sometimes is not predictable without looking at a sizable chunk of the input stream)
Quoth the article: "In fact, since most images and sounds on Web pages are compressed already, the modem's attempts to compress the data a second time is futile, and just adds more latency without giving any benefit."
The point is that the article itself addresses this point.
=== Don't we agree that compression requires processing input data stream in a window, which introduces extra latency? ===
No, we don't agree. Your point is correct for a specific use case of compression. However, the article describes using compression such as JPEG for images and MPEG for videos. Typically, images are not stored in raw form and compressed to JPEG only when requested (which would introduce latency, as you suggest). Rather, images are compressed in advanced and stored in their compressed form. This use case of compression does not introduce extra latency.
I believe for voice the human ear can't detect 20ms differences, but when you talk about video I have not seen numbers. Many HD video applications require latency under 100ms for the interaction to feel natural, and we currently lack a better solution for this. Example: HD video between Shanghai and Buenos Aires would be over 150ms in delay with just the speed of light and the fiber delay.
Sure, TCP-only clients such as web browsers might have contributed to the problem. But on a technical point of view, those applications are exactly the use-cases UDP has been designed for.
I guess the next step after web sockets (http://www.w3.org/TR/websockets/) will be a UDP-variant of web sockets, enabling web clients to do what native clients have always been able to do: basic networking stuff via TCP and UDP. Alternatively, a UDP variant of HTTP might emerge.
Just found a video that talks about this here: http://www.youtube.com/watch?v=Rcvx5QHTJ5U
The reason LANs generally haven't cared about propagation delay is that they are not using networks already operating near the ultimate bottleneck: the speed of light. Some college campuses I know of have less bandwidth than an iPhone. But for Internet-scale computing, propagation delay is evident.
Ironically, connections that are sending bulk data (eg. downloads) don't run into this, because a lot of packets get sent at once; if one of them in the middle gets dropped, the recipient knows it right away (because the next one has the wrong sequence number) so it can immediately send an ACK that re-requests the missing one. So on a busy connection, packet loss isn't as big a problem. On an interactive connection like ssh, it's completely deadly and makes it almost unusable.
All that to say: your problem with Wimax is fixable. It's not a latency problem, but nobody has fixed it yet.
Why is this bad? Because it screws with TCP window adjustments. Remember that your OS will send packets until it starts to see drops, then back off of the transmit rate. You can adjust the parameters (startup rate, backoff rate), but that's the basic principle. However, when there is an overly large buffer somewhere in the middle of the network, this delays drops. This has the effect of making it nearly impossible for your TCP stack to determine the true bandwidth.
For some reason, most mobile device manufacturers are the worst offenders when it comes to bufferbloat.
Anyways, this was a brief summary. For a much better explanation (including pretty graphs), see http://www.bufferbloat.net/