15-441 Computer NetworkingOutlineSimple HashingConsistent HashConsistent Hash – ExampleHow Akamai WorksAkamai – Subsequent RequestsHTTP (Summary)Slide 9Functionality SplitTransport ProtocolsUDP: User Datagram Protocol [RFC 768]UDP, cont.UDP ChecksumHigh-Level TCP CharacteristicsTCP HeaderEvolution of TCPTCP Through the 1990sSlide 19Stop and WaitRecovering from ErrorProblems with Stop and WaitHow to Recognize Resends?How to Keep the Pipe Full?Sliding WindowSender/Receiver StateWindow Sliding – Common CaseLoss RecoveryGo-Back-N in ActionSelective RepeatSelective Repeat: Sender, Receiver WindowsSequence NumbersSlide 33Sequence Number SpaceTCP Flow ControlWindow Flow Control: Send SideSlide 37Window Flow Control: Receive SideTCP PersistPerformance ConsiderationsNext Lecture15-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 smallLecture 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 2n circle, 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 2Akamai 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•ReplicationLecture 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 desiredLecture 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 # Dest port #32 bitsApplicationdata (message)UDP segment formatLengthChecksumLength, 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 TCPLecture 7: 09-18-2002 16TCP HeaderSource port Destination portSequence numberAcknowledgementAdvertised windowHdrLenFlags0Checksum Urgent pointerOptions (variable)DataFlags:SYNFINRESETPUSHURGACKLecture 7: 09-18-2002 17Evolution of TCP1975 1980198519901982TCP & IPRFC 793 & 7911974TCP described byVint Cerf and 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(most implemented in 4.3BSD Tahoe)19904.3BSD Renofast retransmitdelayed ACK’s1975Three-way handshakeRaymond TomlinsonIn SIGCOMM 75Lecture 7: 09-18-2002 18TCP Through the 1990s1993199419961994ECN(Floyd)Explicit CongestionNotification1993TCP Vegas (Brakmo et 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
View Full Document