Wednesday, March 12, 2014

TCP Flow

Study notes from reviewing TCP and the basic components.

Segments are chunks of data that come into the TCP buffer.  A segment on the wire includes the data and headers.

Sequence numbers start with a random value (ISN) and are unidirectional.  The sequence number tracks the data flow and is used to track down what chuck of the flow is lost.

ACK's are the sequence number plus 1.

Windows size is a collection of sequence numbers and is used to track how much of the buffer the receiver can consume.  It slides is a scaling factor number (grows and the connection is stable and shrinks when drops occur).

Selective ACK's can group a range of packets to identify what was lost (this speeds up the flow of TCP).

TCP is also full-duplex, so the same steam is used for both directions, unlink IPSec SA's.

Economics

Here's an interesting article about Greenspan's new book.  It looks like Greenspan has now come to the conclusion that economics is not a hard science and can't be understood in simple tables.

Tuesday, March 11, 2014

TCP, HTTP and SPDY Protocols

Here's an interesting webcast by Ivan Pepelnjak on TCP, HTTP and the new protocol from Google called SPDY.

In short, the problem with many websites is that TCP was written back in the 1980's and not optimized for today's high-speed networks.  Add to the problem, HTTP was written also to be a universal protocol delivering many components for web sites.  Put these two together and you have a stack that works, but is not optimized for quick applications.  The solutions now days are to increase the presentation layer to be stateful in keeping connections open to clients for as long as they can (at the cost of memory on the servers) or have the clients process cookies and be slowed down as they reconnect.

Google's answer to the problem is to have a new session layer protocol that establishes connectivity quickly and has a low footprint, allowing legacy http applications to stay open and start-up fast.  The protocol is designed to work over a secure TLS layer without the additional overhead that the current TCP implementation has.

It's a good challenge to see if it works.  Initially the results are that the protocol is not that much faster, but with more light-weight appliances coming online that have built in web server interfaces, this may be a answer to bloated applications we see now.