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

Similar documents
Chapter 2 Application Layer

CSC 401 Data and Computer Communications Networks

Application Layer: P2P File Distribution

Multimedia: video ... frame i+1

Week-12 (Multimedia Networking)

Mohammad Hossein Manshaei 1393

Chapter 2: Application layer

COMP6218: Content Caches. Prof Leslie Carr

CMSC 332 Computer Networks P2P and Sockets

Content distribution networks

Web caches (proxy server)

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

CSC358 Week 3. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Lecture 8: Application Layer P2P Applications and DHTs

Chapter 2 Application Layer

CSC 4900 Computer Networks: P2P and Sockets

CSC 4900 Computer Networks: Multimedia Applications

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

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

MULTIMEDIA I CSC 249 APRIL 26, Multimedia Classes of Applications Services Evolution of protocols

CC451 Computer Networks

Computer Networking Introduction

Lec 17 Multimedia Transport: RTP, TCP/HTTP and QUIC

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

CS 3516: Advanced Computer Networks

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 6

Computer Communication Networks Application

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

Section 2: Application layer

CS 3516: Computer Networks

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

Chapter 2: outline. 2.5 P2P applications 2.6 video streaming and content distribution networks 2.7 socket programming with UDP and TCP

Chapter 2: Application Layer

Chapter 2: outline. 2.5 P2P applications 2.6 video streaming and content distribution networks 2.7 socket programming with UDP and TCP

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

Chapter 2 Application Layer

Peer-to-Peer Applications Reading: 9.4

Multimedia networking: outline

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Chapter 9. Multimedia Networking. Computer Networking: A Top Down Approach

CSC 401 Data and Computer Communications Networks

Client/Server Computing & Socket Programming

Chapter 7 Multimedia Networking

internet technologies and standards

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

Lecture 17: Peer-to-Peer System and BitTorrent

Introduction to the Application Layer. Computer Networks Term B14

Chapter 1 Introduction

Computer Communication Networks Midterm Review

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 4

Chapter 2 Application Layer

Introduction to P P Networks

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

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

Application layer. Some network apps. Client-server architecture. Hybrid of client-server and P2P. Pure P2P architecture. Creating a network app

Lecture 2 - Application Layer. Lecture 1 Review. Application Layer. Principles of network applications. Notes. Notes. Notes. Notes

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

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

Network and Mobile Compu4ng in the 20 th Century and Beyond. COMP 1400 Memorial University Winter 2015

Extreme Computing. BitTorrent and incentive-based overlay networks.

Information Network Systems The application layer. Stephan Sigg

Chapter 2 Application Layer

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

Multimedia Networking

Chapter 2 Application Layer

Chapter 2 Application Layer

Application Layer. Chapter 2. Computer Networking: A Top Down Approach. A note on the use of these Powerpoint slides:

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

Protocol Layers, Security Sec: Application Layer: Sec 2.1 Prof Lina Battestilli Fall 2017

internet technologies and standards

CPS 706 Computer Networks (Fall 2011)

Chapter 2 Application Layer

Game Theory. Presented by Hakim Weatherspoon

Multimedia networking: outline

P2P content distribution Jukka K. Nurminen

EC441 Fall 2018 Introduction to Computer Networking Chapter 2: Application Layer

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

Adaptive Video Acceleration. White Paper. 1 P a g e

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Client/Server Computing

Chapter 2. Computer Networking: A Top. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Application Layer Chapter 7

CS118 Discussion Week 2. Taqi

Complex Interactions in Content Distribution Ecosystem and QoE

Goal and A sample Network App

Network Application. Topic. Principle of Network Application. Principle of Network Application

CSE3213 Computer Network I

Chapter 2 Application Layer

Content Distribution and BitTorrent [Based on slides by Cosmin Arad]

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

Chapter 1. Computer Networks and the Internet

Octoshape. Commercial hosting not cable to home, founded 2003

Second Generation P2P Live Streaming

Internet Protocol Stack! Principles of Network Applications! Some Network Apps" (and Their Protocols)! Application-Layer Protocols! Our goals:!

Computer Networks. Wenzhong Li. Nanjing University

CSE 486/586 Distributed Systems Peer-to-Peer Architectures

CSEN 503 Introduction to Communication Networks

Chapter 2 Application Layer

Lecture 05: Application Layer (Part 02) FTP, Peer-to-Peer, . Dr. Anis Koubaa

A Tale of Three CDNs

Transcription:

COMP 431 Internet Services & Protocols Application-Layer Protocols Peer-to-Peer Systems, Media Streaming & Content Delivery Networks Jasleen Kaur February 14, 2019 Application-Layer Protocols Outline Example client/server systems and their -level protocols:» The World-Wide Web (HTTP)» Reliable file transfer (FTP)» E-mail (SMTP & POP)» Internet Domain Name System (DNS) Example p2p s systems:» BitTorrent Other protocols and systems:» Streaming media DASH» Content delivery s (CDNs) Institutional regional ISP 1 2

The Application Layer The client-server paradigm Typical has two pieces: client and server Client Initiates contact» Requests service from server» Does not communicate with other clients Server Provided requested service to client» Always running» Typically has a static IP address» A server may be a logical machine» Implemented by one of thousands of servers in a data center Client regional ISP reply request Institutional Server 3 The Application Layer The peer-to-peer-paradigm No always-on server Arbitrary end systems directly communicate» Peers request service from other peers, provide service in return to other peers Self scalability new peers bring new service capacity, as well as new service demands Peers are intermittently connected and change IP addresses Complex management Institutional regional ISP 4

The Application Layer The peer-to-peer-paradigm No always-on server Arbitrary end systems directly communicate» Peers request service from other Examples: regional ISP peers, provide service in return to» File distribution (BitTorrent) other peers» Streaming (KanKan) Self scalability new peers bring» VoIP (Skype) new service capacity, as well as new service demands Peers are intermittently Institutional connected and change IP addresses Complex management 5 Peer-to-Peer Systems Peer-to-peer v. client/server file distribution Question: How much time is required to distribute a file from one server to N peers?» In the case when peer upload/download capacity is the limiting resource file, size F server u N d N u s: server upload capacity u s u 1 d 1 u 2 d 2 (with abundant bandwidth) d i u i d i: peer i download capacity u i: peer i upload capacity 6

Peer-to-Peer Systems Client/server file distribution time Peer-to-Peer Systems Peer-to-Peer file distribution time Server must sequentially send (upload) N file copies:» Time to send one copy: F/u s» Time to send N copies: NF/u s Each client must download a copy of the file» d min = minimum client download rate» Minimum client download time = F/d min F u s d i u i Server must also upload at least one copy» Time to send one copy: F/u s Each client must download a copy of the file» Minimum client download time = F/d min In aggregate, clients must download NF bits» Max upload rate (thus, the limiting max download rate) is u s + Σ u i F u s d i u i time to distribute F to N clients using client-server approach D cs max "# #, $ % ' ()* time to distribute F to N clients using P2P approach D P2P max # $ %, # ' ()*, "# $ % + $ ) Increases linearly in N 7 increases linearly in N but so does this, as each peer brings service capacity 8

Peer-to-Peer Systems Peer-to-peer v. client/server example Minimum Distribution Time Client upload rate = u, F/u = 1 hour, u s = 10u, d min u s 3.5 3 2.5 2 1.5 1 0.5 0 P2P Client-Server 0 5 10 15 20 25 30 35 D cs max "#, $ % # ' ()* D P2P max # # "#,, $ % ' ()* $ %+ $ ) Peer-to-Peer File Distribution BitTorrent Files are divided into 256Kb chunks Peers in the torrent send and receive file chunks tracker: tracks peers participating in torrent Alice arrives obtains list of peers from tracker and begins exchanging file chunks with peers in torrent torrent: group of peers exchanging chunks of a file N 9 10

Peer-to-Peer File Distribution BitTorrent When a peer joins a torrent:» It has no chunks, but will accumulate them over time from other peers» It registers with the tracker to get a list of peers» Connects to subset of peers ( neighbors ) While downloading, peer uploads chunks to other peers A peer may change peers with whom it exchanges chunks» ( Churn peers may come and go) Once the peer has the entire file, it may (selfishly) leave or (altruistically) remain in torrent BitTorrent Requesting & sending file chunks Requesting chunks:» At any given time, different peers have different subsets of file chunks» Periodically, Alice asks each peer for the list of chunks that they have» Alice requests missing chunks from peers, starting with the rarest chunk first Sending chunks: tit-for-tat» Alice sends chunks to the four peers currently sending her chunks at the highest rate Other peers are choked by Alice (do not receive chunks from her) Re-evaluate top 4 every10 secs» Every 30 secs the peer randomly select another peer & starts sending chunks Optimistically unchoke this peer Newly chosen peer may join top 4 11 12

BitTorrent Tit-for-tat (1) Alice optimistically unchokes Bob (2) Alice becomes one of Bob s top-four providers; Bob reciprocates (3) Bob becomes one of Alice s top-four providers higher upload rate means you find better trading partners & get file faster! 13 Application-Layer Protocols Video streaming and content delivery s Video streaming is the major consumer of Internet bandwidth» Netflix, YouTube: 37%, 16% of downstream residential ISP traffic» ~1B YouTube users, ~75M Netflix users How do you design a service to reach ~1B users?» A single mega-video server won t work How do you deal with end-system heterogeneity?» Different users have different capabilities (e.g., wired versus mobile; bandwidth rich versus bandwidth poor) Solution: A distributed, -level delivery infrastructure 14

Video Streaming Multimedia basics Video is a sequence of images displayed at constant rate» e.g., 24 images/sec Each image is a (2D) array of pixels» Each pixel represented by some number of bits Coding: use redundancy within and between images to decrease the number bits used to encode image» Spatial (within image)» Temporal (from one image to next) spatial coding example: instead of sending N values of same color (all purple), send only two values: color value (purple) and number of repeated values (N).... frame i temporal coding example: instead of sending complete frame at i+1, send only differences from frame i frame i+1 15 Video Streaming Multimedia basics CBR (constant bit rate): Video is encoded at a rate fixed VBR (variable bit rate): Video encoding rate changes as amount of spatial, temporal redundancy changes Examples:» MPEG 1 (CD-ROM) 1.5 Mbps» MPEG 2 (DVD) 3-6 Mbps» MPEG 4 (often used for Internet streaming) < 1 Mbps spatial coding example: instead of sending N values of same color (all purple), send only two values: color value (purple) and number of repeated values (N).... frame i temporal coding example: instead of sending complete frame at i+1, send only differences from frame i frame i+1 16

Video Streaming Application-layer protocols Video Streaming Application-layer protocols video server (stored video) Internet client video server (stored video) Internet client DASH: Dynamic, Adaptive Streaming over HTTP Server functions:» Divides video file into multiple chunks» Each chunk stored, encoded at different rates» Provides a manifest file with URLs for different chunks Client:» Periodically measures server-to-client bandwidth,» Requests one chunk at a time chooses maximum coding rate sustainable given current bandwidth DASH: Dynamic, Adaptive Streaming over HTTP Intelligence at the client determines:» When to request chunks (so that buffer starvation, or overflow does not occur)» What encoding rate to request (higher quality when more bandwidth available)» Where to request chunk (can request from Web server that is close to client or has high available bandwidth) 17 18

Video Streaming Content distribution s Video Streaming Content distribution s video server (stored video) Internet client video server (stored video) Internet client The challenge is how to stream content (selected from millions of videos) to hundreds of thousands of simultaneous users? Option 1: single, large mega-server» Single point of failure» Single point of congestion» Long delivery path to distant clients (high latency), reliability issues,» Multiple copies of the video sent over outgoing» THIS SOLUTION DOESN T SCALE!! 19 The challenge is how to stream content (selected from millions of videos) to hundreds of thousands of simultaneous users? Option 2: store/serve multiple copies of videos at multiple geographically distributed sites (CDN)» Enter deep design: push CDN servers deep into access s Cache close to users (in the last mile ) Used by Akamai with servers at over 1,700 locations» Bring home design: smaller number (10 s) of larger clusters in POPs near (but not within) access s Used by Limelight 20

Content Distribution Networks Content Distribution Networks Distribution example Challenges CDN: stores copies of content at CDN nodes Subscriber requests content from CDN (via the Web)» e.g., Netflix stores copies of Mad Men» Client is directed to nearby server with the content» Client can choose a different copy if the path is congested over the top manifest file where s Madmen? 21 22

Content Distribution Networks Challenges Content Distribution Networks Distribution example Bob requests the video http://netcinema. com/6y7b23v» The video stored in King CDN at http://kingcdn.com/netc6y&b23v Internet host-host communication as a service OTT challenges: coping with a congested Internet» From which CDN node should we retrieve content?» Viewer behavior in presence of congestion?» What content to cache in which CDN node? 23 1. Bob gets URL for video http://video.netcinema.com/6y7b23v from netcinema.com web page netcinema.com netcinema s authoritative DNS 1 KingCDN.com 2 6. request video from5 KINGCDN server, streamed via HTTP 2. Resolve video.netcinema.com in URL via Bob s local DNS Bob s local DNS server 4&5. Resolve x.y.kingcdn.com via 3. netcinema s DNS returns KingCDN s authoritative DNS, hostname x.y.kingcdn.com 4 which returns IP address of KingCDN server with video 3 KingCDN authoritative DNS 24

Content Distribution Networks Case study: Netflix 1. Bob manages Netflix account Amazon cloud Netflix registration, accounting servers 2. Bob browses 3. Manifest file Netflix video returned for 2 3 requested video 1 Upload copies of multiple versions of video to CDN servers 4. DASH streaming CDN server CDN server CDN server 25