115-441 Computer NetworkingLecture 7 – Transport ProtocolsLecture 7: 09-18-2002 2Outline• Akamai• Transport introduction• Error recovery• TCP flow controlLecture 7: 09-18-2002 3Simple Hashing• Given document XYZ, we need to choose a server to use• Suppose we use modulo• Number servers from 1…n• Place document XYZ on server (XYZ mod n)• What happens when a servers fails? n à n-1• Same if different people have different measures of n• Why might this be bad?Lecture 7: 09-18-2002 4Consistent Hash• “view” = subset of all hash buckets that are visible• Desired features• Balanced – in any one view, load is equal across buckets• Smoothness – little impact on hash bucket contents when buckets are added/removed• Spread – small set of hash buckets that may hold an object regardless of views • Load – across all views # of objects assigned to hash bucket is small2Lecture 7: 09-18-2002 5Consistent Hash – Example• Smoothness à addition of bucket does not cause movement between existing buckets• Spread & Load à small set of buckets that lie near object• Balance à no bucket is responsible for large number of objects• Construction• Assign each of C hash buckets to random points on mod 2ncircle, where, hash key size = n.• Map object to random position on circle• Hash of object = closest clockwise bucket04812Bucket14Lecture 7: 09-18-2002 6How Akamai WorksEnd-usercnn.com (content provider) DNS root server Akamai server1 2 34Akamai high-level DNS serverAkamai low-level DNS serverNearby matchingAkamai server11678910Get index.htmlGet /cnn.com/foo.jpg12Get foo.jpg5Lecture 7: 09-18-2002 7Akamai – Subsequent RequestsEnd-usercnn.com (content provider) DNS root server Akamai server1 2 Akamai high-level DNS serverAkamai low-level DNS server78910Get index.htmlGet /cnn.com/foo.jpgNearby matchingAkamai serverLecture 7: 09-18-2002 8HTTP (Summary)• Simple text-based file exchange protocol • Support for status/error responses, authentication, client-side state maintenance, cache maintenance• Workloads• Typical documents structure, popularity• Server workload• Interactions with TCP• Connection setup, reliability, state maintenance• Persistent connections• How to improve performance• Persistent connections• Caching• Replication3Lecture 7: 09-18-2002 9Outline• Akamai• Transport introduction• Error recovery• TCP flow controlLecture 7: 09-18-2002 10Functionality Split• Network provides best-effort delivery• End-systems implement many functions• Reliability• In-order delivery• Demultiplexing• Message boundaries• Connection abstraction• Congestion control• …Lecture 7: 09-18-2002 11Transport Protocols• UDP provides just integrity and demux• TCP adds…• Connection-oriented• Reliable• Ordered• Point-to-point• Byte-stream• Full duplex• Flow and congestion controlledLecture 7: 09-18-2002 12UDP: User Datagram Protocol [RFC 768]• “No frills,” “bare bones” Internet transport protocol• “Best effort” service, UDP segments may be:• Lost• Delivered out of order to app• Connectionless:• No handshaking between UDP sender, receiver• Each UDP segment handled independently of othersWhy is there a UDP?• No connection establishment (which can add delay)• Simple: no connection state at sender, receiver• Small header• No congestion control: UDP can blast away as fast as desired4Lecture 7: 09-18-2002 13UDP, cont.• Often used for streaming multimedia apps• Loss tolerant• Rate sensitive• Other UDP uses (why?):• DNS, SNMP• Reliable transfer over UDP• Must be at application layer• Application-specific error recoverySource port # Destport #32 bitsApplicationdata (message)UDP segment formatLength ChecksumLength, inbytes of UDPsegment,includingheaderLecture 7: 09-18-2002 14UDP ChecksumSender:• Treat segment contents as sequence of 16-bit integers• Checksum: addition (1’s complement sum) of segment contents• Sender puts checksum value into UDP checksum fieldReceiver:• Compute checksum of received segment• Check if computed checksum equals checksum field value:• NO - error detected• YES - no error detected. But maybe errors nonethless?Goal: detect “errors” (e.g., flipped bits) in transmitted segment – optional use!Lecture 7: 09-18-2002 15High-Level TCP Characteristics• Protocol implemented entirely at the ends• Fate sharing• Protocol has evolved over time and will continue to do so• Nearly impossible to change the header• Uses options to add information to the header• Change processing at endpoints• Backward compatibility is what makes it TCP Lecture 7: 09-18-2002 16TCP HeaderSource port Destination portSequence numberAcknowledgementAdvertised windowHdrLenFlags0Checksum Urgent pointerOptions (variable)DataFlags:SYNFINRESETPUSHURGACK5Lecture 7: 09-18-2002 17Evolution of TCP1975 1980 198519901982TCP & IPRFC 793 & 7911974TCPdescribed byVint Cerfand Bob KahnIn IEEE Trans Comm1983BSD Unix 4.2supports TCP/IP1984Nagel’s algorithmto reduce overheadof small packets;predicts congestion collapse1987Karn’s algorithmto better estimate round-trip time1986Congestion collapseobserved1988Van Jacobson’s algorithmscongestion avoidance and congestion control(mostimplemented in 4.3BSD Tahoe)19904.3BSD Renofast retransmitdelayed ACK’s1975Three-way handshakeRaymond TomlinsonIn SIGCOMM 75Lecture 7: 09-18-2002 18TCP Through the 1990s1993 199419961994ECN(Floyd)Explicit CongestionNotification1993TCP Vegas (Brakmoet al)real congestion avoidance1994T/TCP(Braden)TransactionTCP1996SACK TCP(Floyd et al)Selective Acknowledgement1996HoeImproving TCP startup1996FACK TCP(Mathis et al)extension to SACKLecture 7: 09-18-2002 19Outline• Akamai• Transport introduction• Error recovery• TCP flow controlLecture 7: 09-18-2002 20Stop and WaitTimePacketACKTimeout• ARQ• Receiver sends acknowledgement (ACK) when it receives packet• Sender waits for ACK and timeouts if it does not arrive within some time period• Simplest ARQ protocol• Send a packet, stop and wait until ACK arrives Sender Receiver6Lecture 7: 09-18-2002 21Recovering from ErrorPacketACKTimeoutPacketACKTimeoutPacketTimeoutPacketACKTimeoutTimePacketACKTimeoutPacketACKTimeoutACK lost Packet lostEarly timeoutLecture 7: 09-18-2002 22• How to recognize a duplicate• Performance• Can only send one packet per round tripProblems with Stop and WaitLecture 7: 09-18-2002 23How to Recognize
View Full Document