CS 43: Computer Networks. 14: DHTs and CDNs October 3, 2018

Similar documents
CS 43: Computer Networks BitTorrent & Content Distribution. Kevin Webb Swarthmore College September 28, 2017

416 Distributed Systems. March 23, 2018 CDNs

Lecture 8: Application Layer P2P Applications and DHTs

Application-Layer Protocols Peer-to-Peer Systems, Media Streaming & Content Delivery Networks

CompSci 356: Computer Network Architectures Lecture 21: Overlay Networks Chap 9.4. Xiaowei Yang

DISTRIBUTED SYSTEMS CSCI 4963/ /4/2015

Today s class. CSE 123b Communications Software. Telnet. Network File System (NFS) Quick descriptions of some other sample applications

Overview Computer Networking Lecture 16: Delivering Content: Peer to Peer and CDNs Peter Steenkiste

CSE 123b Communications Software

Peer-to-Peer Systems and Distributed Hash Tables

Content Overlays. Nick Feamster CS 7260 March 12, 2007

Today. Why might P2P be a win? What is a Peer-to-Peer (P2P) system? Peer-to-Peer Systems and Distributed Hash Tables

Server Selection Mechanism. Server Selection Policy. Content Distribution Network. Content Distribution Networks. Proactive content replication

Content Overlays (continued) Nick Feamster CS 7260 March 26, 2007

Last Lecture SMTP. SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 1

CSCI-1680 P2P Rodrigo Fonseca

Distributed Hash Tables: Chord

Lecture 6: Overlay Networks. CS 598: Advanced Internetworking Matthew Caesar February 15, 2011

Last Time. CSE 486/586 Distributed Systems Distributed Hash Tables. What We Want. Today s Question. What We Want. What We Don t Want C 1

Application Layer: P2P File Distribution

Content Distribution. Today. l Challenges of content delivery l Content distribution networks l CDN through an example

Chapter 2: Application layer

C 1. Last Time. CSE 486/586 Distributed Systems Distributed Hash Tables. Today s Question. What We Want. What We Want. What We Don t Want

PEER-TO-PEER NETWORKS, DHTS, AND CHORD

Web, HTTP, Caching, CDNs

CSE 124: CONTENT-DISTRIBUTION NETWORKS. George Porter December 4, 2017

CS 3516: Advanced Computer Networks

CSC 4900 Computer Networks: P2P and Sockets

CONTENT-DISTRIBUTION NETWORKS

CMSC 332 Computer Networks P2P and Sockets

Mul$media Networking. #9 CDN Solu$ons Semester Ganjil 2012 PTIIK Universitas Brawijaya

Distributed Hash Tables

Section 2: Application layer

Distributed Hash Tables

Distributed Systems. 16. Distributed Lookup. Paul Krzyzanowski. Rutgers University. Fall 2017

Introduction to Computer Networks

CSCI-1680 Web Performance, Content Distribution P2P John Jannotti

CPSC 426/526. P2P Lookup Service. Ennan Zhai. Computer Science Department Yale University

Web caches (proxy server) Applications (part 3) Applications (part 3) Caching example (1) More about Web caching

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

CS 640 Introduction to Computer Networks. Today s lecture. What is P2P? Lecture30. Peer to peer applications

P2P Applications. Reti di Elaboratori Corso di Laurea in Informatica Università degli Studi di Roma La Sapienza

Peer to Peer Networks

08 Distributed Hash Tables

Overlay networks. To do. Overlay networks. P2P evolution DHTs in general, Chord and Kademlia. Turtles all the way down. q q q

CSCI-1680 Web Performance, Content Distribution P2P Rodrigo Fonseca

Distributed Systems. 17. Distributed Lookup. Paul Krzyzanowski. Rutgers University. Fall 2016

CSE 486/586 Distributed Systems

CIS 700/005 Networking Meets Databases

internet technologies and standards

Drafting Behind Akamai (Travelocity-Based Detouring)

Peer to Peer Systems and Probabilistic Protocols

Peer to Peer Networks

How Akamai delivers your packets - the insight. Christian Kaufmann SwiNOG #21 11th Nov 2010

CSC2231: DNS with DHTs

Overlay and P2P Networks. Applications. Prof. Sasu Tarkoma and

: Scalable Lookup

March 10, Distributed Hash-based Lookup. for Peer-to-Peer Systems. Sandeep Shelke Shrirang Shirodkar MTech I CSE

Overlay networks. Today. l Overlays networks l P2P evolution l Pastry as a routing overlay example

Page 1. How Did it Start?" Model" Main Challenge" CS162 Operating Systems and Systems Programming Lecture 24. Peer-to-Peer Networks"

CS514: Intermediate Course in Computer Systems

Overlay networks. T o do. Overlay networks. P2P evolution DHTs in general, Chord and Kademlia. q q q. Turtles all the way down

CE693: Adv. Computer Networking

Peer-to-Peer (P2P) Systems

Introduction to P2P systems

DISTRIBUTED SYSTEMS [COMP9243] Lecture 9a: Naming WHAT IS NAMING? Name: Entity: Slide 3. Slide 1. Address: Identifier:

Today. Architectural Styles

Modern Technology of Internet

CS 3516: Computer Networks

Lecture 17: Peer-to-Peer System and BitTorrent

Horizontal or vertical scalability? Horizontal scaling is challenging. Today. Scaling Out Key-Value Storage

Files/News/Software Distribution on Demand. Replicated Internet Sites. Means of Content Distribution. Computer Networks 11/9/2009

Kademlia: A P2P Informa2on System Based on the XOR Metric

Peer to Peer I II 1 CS 138. Copyright 2015 Thomas W. Doeppner, Rodrigo Fonseca. All rights reserved.

Page 1. Key Value Storage" System Examples" Key Values: Examples "

CC451 Computer Networks

Outline Computer Networking. HTTP Basics (Review) How to Mark End of Message? (Review)

Overlay and P2P Networks. Structured Networks and DHTs. Prof. Sasu Tarkoma

Chapter 2 Application Layer

A Scalable Content- Addressable Network

CSE 486/586 Distributed Systems

Architectures for distributed systems (Chapter 2)

Applications & Application-Layer Protocols: The Domain Name System and Peerto-Peer

Page 1. Key Value Storage"

Introduction to Peer-to-Peer Systems

EE 122: Peer-to-Peer Networks

Today. Architectural Styles

P2P Applications. Reti di Elaboratori Corso di Laurea in Informatica Università degli Studi di Roma La Sapienza Canale A-L Prof.ssa Chiara Petrioli

Content distribution networks

Computer Networking Introduction

Scaling Out Key-Value Storage

BitTorrent. Masood Khosroshahy. July Tech. Report. Copyright 2009 Masood Khosroshahy, All rights reserved.

Scaling KVS. CS6450: Distributed Systems Lecture 14. Ryan Stutsman

Page 1. CS162 Operating Systems and Systems Programming Lecture 22. Networking III. Automatic Repeat Request

Content Distribu-on Networks (CDNs)

Finding Data in the Cloud using Distributed Hash Tables (Chord) IBM Haifa Research Storage Systems

Introduction to P2P Computing

Peer-to-Peer Systems. Network Science: Introduction. P2P History: P2P History: 1999 today

416 Distributed Systems. Mar 3, Peer-to-Peer Part 2

Telematics Chapter 9: Peer-to-Peer Networks

Transcription:

CS 43: Computer Networks 14: DHTs and CDNs October 3, 2018

If Alice wants to stream Mad Men over a highspeed Internet connection her browser may choose a video rate A. in the range of Mbps. B. in the range of kbps. C. in the range of bps.

Clients streaming video over HTTP can choose from one of many bit rates using. A. CStream B. DASH C. RunFAST D. StreamQuik

CDNs manipulate to help clients find nearby content servers. A. HTTP GET requests B. TCP connection establishment C. DNS query responses

Last Class: BitTorrent File transfer problem self-scalability with P2P systems BitTorrent: list of chunks and cryptographic hashes peers request rarest chunks first churn: peers join and leave send to four peers at the highest rate, choke other peers randomly select and optimistically unchoke a fifth peer Lecture 14 - Slide 5

Today Distributed Hash Tables Finding things without central authority Content distribution networks (CDNs) Add hosts to network to exploit locality Video streaming DASH: Dynamic Adaptive Streaming over HTTP Lecture 13 - Slide 6

File Transfer Problem You want to distribute a file to a large number of people as quickly as possible. Lecture 13 - Slide 7

Traditional Client/Server Free Capacity Heavy Congestion Lecture 13 - Slide 8

P2P Solution Lecture 13 - Slide 9

Getting rid of that server Distribute the tracker information using a Distributed Hash Table (DHT) A DHT is a lookup structure Maps keys to an arbitrary value. Works a lot like, well a hash table. Lecture 13 - Slide 10

Recall: Hash Function Mapping of any data to an integer E.g., md5sum, sha1, etc. md5: 04c3416cadd85971a129dd1de86cee49 With a good (cryptographic) hash function: Hash values very likely to be unique Near-impossible to find collisions (hashes spread out) Lecture 13 - Slide 11

Recall: Hash table N buckets Key-value pair is assigned bucket i i = HASH(key)%N Easy to look up value based on key Multiple key-value pairs assigned to each bucket Lecture 13 - Slide 12

Distributed Hash Table (DHT) DHT: a distributed P2P database Distribute the (k, v) pairs across the peers key: ss number; value: human name key: file name; value: BT tracker peer(s) Same interface as standard HT: (key, value) pairs get(key) send key to DHT, get back value put(key, value) modify stored value at the given key Lecture 13 - Slide 13

Overlay Network (P2P) A network made up of virtual or logical links Virtual links map to one or more physical links Lecture 13 - Slide 14

Overlay Network (P2P) A network made up of virtual or logical links Virtual links map to one or more physical links Lecture 13 - Slide 15

Challenges How do we assign (key, value) pairs to nodes? How do we find them again quickly? What happens if nodes join/leave? Basic idea: Convert each key to an integer via hash Assign integer to each peer via hash Store (key, value) pair at the peer closest to the key Lecture 13 - Slide 16

DHT identifiers assign n-bit integer identifier to each peer in range [0,2n-1] for some n. require each key to be an integer in same range to get integer key, hash original key, e.g., key = hash( Led Zeppelin IV ) peer1_ip peer23_ip 0 1 Hey Jude Back to Black 2 n -1 Application 2-17

Circular DHT Overlay 1 15 3 12 10 8 Simplest form: each peer only aware of immediate successor and predecessor. 5 4 Lecture 13 - Slide 18

Circular DHT Overlay 1 15 3 12 10 8 Simplest form: each peer only aware of immediate successor and predecessor. 5 4 Lecture 13 - Slide 19

Circular DHT Overlay 1 15 3 12 10 Example: Node 1 wants key Led Zeppelin IV Hash the key 8 5 4 Lecture 13 - Slide 20

Circular DHT Overlay 1 15 3 12 10 Example: Node 1 wants key Led Zeppelin IV Hash the key (suppose it gives us 6) 8 5 4 Lecture 13 - Slide 21

Circular DHT Overlay 1 15 3 12 10 Example: Node 1 wants key Led Zeppelin IV Hash the key (suppose it gives us 6) 8 5 4 Lecture 13 - Slide 22

Circular DHT Overlay 1 15 3 12 10 Example: Node 1 wants key Led Zeppelin IV Hash the key (suppose it gives us 6) 8 5 4 Lecture 13 - Slide 23

Circular DHT Overlay 1 15 3 12 10 Example: Node 1 wants key Led Zeppelin IV Hash the key (suppose it gives us 6) 8 5 4 Lecture 13 - Slide 24

Circular DHT Overlay 1 15 3 12 10 Example: Node 1 wants key Led Zeppelin IV Hash the key (suppose it gives us 6) 8 5 4 If anybody has it, it s my successor. Lecture 13 - Slide 25

Circular DHT Overlay 1 15 3 12 10 8 Checks key Example: Node 1 wants key Led Zeppelin IV Hash the key (suppose it gives us 6) 5 4 Lecture 13 - Slide 26

Circular DHT Overlay 15 12 10 Value Data Example: Node 1 wants key Led Zeppelin IV Hash the key (suppose it gives us 6) 8 1 3 5 4 Lecture 13 - Slide 27

Given N nodes, what is the complexity (number of messages) of finding a value when each peer knows its successor? A. O(log n) Can we do better? How? 1 B. O(n) 15 3 C. O(n 2 ) D. O(2 n ) 12 10 8 5 4 Lecture 13 - Slide 28

Reducing Message Count 1 15 3 4 12 5 10 8 Store successors that are 1, 2, 4, 8,, N/2 away. Can jump up to half way across the ring at once. Cut the search space in half - lookups take O(log N) messages. Lecture 13 - Slide 29

More DHT Info How do nodes join/leave? How does cryptographic hashing work? How much state does each node store? Lecture 13 - Slide 30

More DHT Info How do nodes join/leave? How does cryptographic hashing work? How much state does each node store? Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications Dynamo: Amazon s Highly Available Key-value Store Lecture 13 - Slide 31

High-Performance Content Distribution Problem: You have a service that supplies lots of data. You want good performance for all users! (often lots of data means media files) Lecture 13 - Slide 32

High-Performance Content Distribution CDNs applied to all sorts of traffic. You pay for service (e.g., Akamai), they ll host your content very close to many users. Major challenges: How do we direct the user to a nearby replica instead of the centralized source? How do we determine which replica is the best to send them to? Lecture 13 - Slide 33

Finding the CDN Three main options: Application redirect (e.g., HTTP) Anycast routing DNS resolution (most popular in practice) Example: CNN + Akamai Lecture 13 - Slide 34

Lecture 13 - Slide 35 CNN + Akamai www.cnn.com Request: cnn.com/article Response: HTML with link to cache.cnn.com media Content servers: serve media.

Lecture 13 - Slide 36 CNN + Akamai www.cnn.com Root DNS Servers com DNS servers org DNS servers cnn.com DNS servers pbs.org DNS servers edu DNS servers swarthmore.edu DNS servers Request: cnn.com/article Response: HTML with link to cache.cnn.com media Content servers: serve media.

Lecture 13 - Slide 37 CNN + Akamai www.cnn.com Root DNS Servers com DNS servers org DNS servers cnn.com DNS servers pbs.org DNS servers edu DNS servers swarthmore.edu DNS servers Request: cnn.com/article Response: HTML with link to cache.cnn.com media Retrieve media file. akamai.net DNS servers Akamai s DNS response directs user to selected server. Content servers: serve media.

Lecture 13 - Slide 38 CNN + Akamai www.cnn.com Root DNS Servers com DNS servers org DNS servers cnn.com DNS servers pbs.org DNS servers edu DNS servers swarthmore.edu DNS servers Request: cnn.com/article Response: HTML with link to cache.cnn.com media akamai.net DNS servers How to choose? Retrieve media file. Akamai s DNS response directs user to selected server. Content servers: serve media.

Which metric is most important when choosing a server? (CDN or otherwise) A. RTT latency B. Data transfer rate / throughput C. Hardware ownership D. Geographic location This is the CDN operator s secret sauce! E. Some other metic(s) (such as?) Lecture 13 - Slide 39

Streaming Media Straightforward approach: simple GET Challenges: Dynamic network characteristics Varying user device capabilities User mobility Lecture 13 - Slide 40

Dynamic Adaptive Streaming over HTTP (DASH) Encode several versions of the same media file low / medium / high / ultra quality Break each file into chunks Create a manifest to map file versions to chunks / video time offset Lecture 13 - Slide 41

Dynamic Adaptive Streaming over HTTP (DASH) Client requests manifest file, chooses version Requests new chunks as it plays existing ones Can switch between versions at any time! Lecture 13 - Slide 42

Summary Peer-to-peer architectures for: High performance: BitTorrent Decentralized lookup: DHTs CDNs: locating good replica for media server DASH: streaming despite dynamic conditions Lecture 13 - Slide 43