1 Lecture05: Application layer r Principles of network applications r DNS r P2P and DHT.

Slides:



Advertisements
Similar presentations
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April A note on the use.
Advertisements

Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Domain Name System (or Service) (DNS) Computer Networks Computer Networks Term B10.
No Class on Friday There will be NO class on: FRIDAY 1/30/15.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
Domain Name System (or Service) (DNS) Computer Networks Computer Networks Spring 2012 Spring 2012.
2: Application Layer1 FTP, SMTP and DNS. 2: Application Layer2 FTP: separate control, data connections r FTP client contacts FTP server at port 21, specifying.
1 Domain Name System (DNS). 2 DNS: Domain Name System Internet hosts, routers: –IP address (32 bit) - used for addressing datagrams –“name”, e.g., gaia.cs.umass.edu.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
CSE 124 Networked Services Fall 2009 B. S. Manoj, Ph.D 11/03/2009CSE 124 Network Services FA 2009 Some of these.
Application Layer session 1 TELE3118: Network Technologies Week 12: DNS Some slides have been taken from: r Computer Networking: A Top Down Approach.
Introduction to the Application Layer Computer Networks Computer Networks Spring 2012 Spring 2012.
CPSC 441: DNS1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes derived.
Introduction 1 Lecture 5 Application Layer slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering Department.
Name Resolution and DNS. Domain names and IP addresses r People prefer to use easy-to-remember names instead of IP addresses r Domain names are alphanumeric.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Introduction 1 Lecture 8 Application Layer (DNS, p2p) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April A note on the use.
CS 4396 Computer Networks Lab
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
1 Domain Name System (DNS). 2 DNS: Domain Name System Internet hosts: – IP address (32 bit) - used for addressing datagrams – “name”, e.g.,
Domain Name System (DNS)
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 10 Omar Meqdadi Department of Computer Science and Software Engineering University.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
2: Application Layer 1 1DT066 Distributed Information Systems Chapter 2 Application Layer.
Application Layer – Peer-to-peer UIUC CS438: Communication Networks Summer 2014 Fred Douglas Slides: Fred, Kurose&Ross (sometimes edited)
Throughput: Internet scenario
2: Application Layer 1 1DT066 Distributed Information Systems Chapter 2 Application Layer.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
2: Application Layer1 Some network apps r r Web r Instant messaging r Remote login r P2P file sharing r Multi-user network games r Streaming stored.
CS 471/571 Domain Name Server Slides from Kurose and Ross.
DNS: Domain Name System
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April A note on the use.
DNS: Domain Name System People: many identifiers: – SSN, name, Passport # Internet hosts, routers: – IP address (32 bit) - used for addressing datagrams.
Chapter 2: Application layer
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
What makes a network good? Ch 2.1: Principles of Network Apps 2: Application Layer1.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
1 Peer-to-Peer Systems r Application-layer architectures r Case study: BitTorrent r P2P Search and Distributed Hash Table (DHT)
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP r.
2: Application Layer1 DNS: Domain Name System People have many identifiers: SSN, name, passport number Internet hosts, routers have identifiers, too: IP.
CPSC 441: DNS 1. DNS: Domain Name System Internet hosts: m IP address (32 bit) - used for addressing datagrams m “name”, e.g., - used by.
CS 3830 Day 10 Introduction 1-1. Announcements r Quiz #2 this Friday r Program 2 posted yesterday 2: Application Layer 2.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
2: Application Layer 1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April.
Lecture 5: Web Continued 2-1. Outline  Network basics:  HTTP protocols  Studies on HTTP performance from different views:  Browser types [NSDI 2014]
Computer Networks CSE 434 Fall 2009 Sandeep K. S. Gupta Arizona State University Research Experience.
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
1 Kyung Hee University Chapter 19 DNS (Domain Name System)
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
No Class on Friday There will be NO class on: FRIDAY 1/29/15 1.
PEAR TO PEAR PROTOCOL. Pure P2P architecture no always-on server arbitrary end systems directly communicate peers are intermittently connected and change.
Application Layer, 2.5 DNS 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.
Important r On Friday, could you ask students to please me their groups (one per group) for Project 2 so we can assign IP addresses. I’ll send.
CSEN 404 Application Layer II Amr El Mougy Lamia Al Badrawy.
Spring 2006 CPE : Application Layer_DNS 1 Special Topics in Computer Engineering Application layer: Domain Name System Some of these Slides are.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their original slides that accompany the.
2: Application Layer 1 Some network apps r r Web r Instant messaging r Remote login r P2P file sharing r Multi-user network games r Streaming stored.
Introduction to Networks
Session 6 INST 346 Technologies, Infrastructure and Architecture
Introduction to Communication Networks
Chapter 2 Application Layer
Chapter 7: Application layer
FTP, SMTP and DNS 2: Application Layer.
Presentation transcript:

1 Lecture05: Application layer r Principles of network applications r DNS r P2P and DHT

2 Some network apps r r web r instant messaging r remote login r P2P file sharing r multi-user network games r streaming stored video clips r voice over IP r real-time video conferencing r VoD (Youtube) r Facebook r Twitter r Cloud r ….

3 Application architectures r Client-server r Peer-to-peer (P2P) r Hybrid of client-server and P2P

4 Client-server architecture server:  always-on host  permanent IP address  server farms for scaling clients:  communicate with server (speak first)  may have dynamic IP addresses  do not communicate directly with each other client/server

5 Pure P2P architecture r no always-on server r arbitrary end systems directly communicate r peers are intermittently connected and change IP addresses Highly scalable but difficult to manage peer-peer

6 Hybrid of client-server and P2P Skype  voice-over-IP P2P application  centralized server: finding address of remote party:  client-client connection: direct (not through server) Instant messaging  chatting between two users is (can be) P2P  centralized service: client presence detection/location user registers its IP address with central server when it comes online user contacts central server to find IP addresses of buddies

7 What transport service does an app need? Data loss r some apps (e.g., audio) can tolerate some loss r other apps (e.g., file transfer, telnet) require 100% reliable data transfer Timing r some apps (e.g., Internet telephony, interactive games) require low delay to be “effective” Throughput r some apps (e.g., multimedia) require minimum amount of throughput to be “effective” r other apps (“elastic apps”) make use of whatever throughput they get Security r Encryption, data integrity, …

8 Internet apps: application, transport protocols Application remote terminal access Web file transfer streaming multimedia Internet telephony Application layer protocol SMTP [RFC 2821] Telnet [RFC 854] HTTP [RFC 2616] FTP [RFC 959] HTTP (eg Youtube), RTP [RFC 1889] SIP, RTP, proprietary (e.g., Skype) Underlying transport protocol TCP TCP or UDP typically UDP

9 Lecture05: Application layer r Principles of network applications r DNS r DHT

10 DNS: Domain Name System People: many identifiers:  SSN, name, passport # Internet hosts, routers:  IP address (32 bit) - used for addressing datagrams  “name”, e.g., - used by humans Required: map between name and IP addresses Domain Name System: r distributed database implemented as a hierarchy of many name servers r application-layer protocol used to resolve names (address/name translation)  note: core Internet function, implemented as application-layer protocol

11 DNS Why not centralize DNS? r single point of failure r traffic volume r distant centralized database r maintenance doesn’t scale! DNS services r Hostname to IP address translation r Mail server aliasing r Load distribution  Replicated Web servers: set of IP addresses for one canonical name

12 Root DNS Servers com DNS servers org DNS serversedu DNS servers poly.edu DNS servers umass.edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers Distributed, Hierarchical Database Client wants IP address for 1 st approx: r Client queries a root server to find com DNS server r Client queries com DNS server to get amazon.com DNS server r Client queries amazon.com DNS server to get IP address for

13 DNS: Root name servers 13 root name servers worldwide b USC-ISI Marina del Rey, CA l ICANN Los Angeles, CA e NASA Mt View, CA f Internet Software C. Palo Alto, CA (and 36 other locations) i Autonomica, Stockholm (plus 28 other locations) k RIPE London (also 16 other locations) m WIDE Tokyo (also Seoul, Paris, SF) a Verisign, Dulles, VA c Cogent, Herndon, VA (also LA) d U Maryland College Park, MD g US DoD Vienna, VA h ARL Aberdeen, MD j Verisign, ( 21 locations)

14 Local Name Server r does not strictly belong to hierarchy r each ISP (residential ISP, company, university) has one.  also called “default name server” r when host makes DNS query, query is sent to its local DNS server  acts as proxy, forwards query into hierarchy

15 requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server DNS name resolution example r Host at cis.poly.edu wants IP address for gaia.cs.umass.edu iterated query: r contacted server replies with name of server to contact r “I don’t know this name, but ask this server”

16 requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server 3 recursive query: r puts burden of name resolution on contacted name server DNS name resolution example

17 DNS: caching and updating records r once (any) name server learns mapping, it caches mapping  cache entries timeout (disappear) after some time  typically cached in local name servers Thus root name servers not often visited

18 Lecture05: Application layer r Principles of network applications r DNS r P2P and DHT

19 Pure P2P architecture r no always-on server r arbitrary end systems directly communicate r peers are intermittently connected and change IP addresses r Three topics:  File distribution  Searching for information  Case Study: Skype peer-peer

20 File Distribution: Server-Client vs P2P Question : How much time to distribute file from one server to N peers? usus u2u2 d1d1 d2d2 u1u1 uNuN dNdN Server Network (with abundant bandwidth) File, size F u s : server upload capacity (bps) u i : peer i upload capacity (bps) d i : peer i download capacity (bps)

21 Client-server vs. P2P: example Client upload rate = u, F/u = 1 hour, u s = 10u, d min ≥ u s

22 File distribution: BitTorrent tracker: tracks peers participating in torrent torrent: group of peers exchanging chunks of a file obtain list of peers trading chunks peer r P2P file distribution

23 BitTorrent (1) r file divided into 256KB chunks. r peer joining torrent:  registers with tracker to get list of peers, connects to subset of peers (“neighbors”)  has no chunks, but will accumulate them over time r while downloading, peer uploads chunks to other peers. r peers may come and go r once a peer has entire file, it may (selfishly) leave or (altruistically) remain

24 BitTorrent (2) Pulling Chunks r at any given time, different peers have different subsets of file chunks r periodically, a peer (Alice) asks each neighbor for list of chunks that they have. r Alice sends requests for her missing chunks  rarest first Sending Chunks: tit-for-tat r Alice sends chunks to four neighbors currently sending her chunks at the highest rate  re-evaluate top 4 every 10 secs r every 30 secs: randomly select another peer, starts sending chunks  “optimistically unchoke”

25 Finding a better trading partner (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 With higher upload rate, can find better trading partners & get file faster!

26 Distributed Hash Table (DHT) r DHT = distributed P2P database r Database has (key, value) pairs;  key: ss number; value: human name  key: content type; value: IP address r Peers query database with key  database returns values that match the key r Peers can also insert (key, value) pairs into database r Finding “needles” requires that the P2P system be structured

27 DHT Identifiers r Assign integer identifier to each peer in range [0,2 n -1].  Each identifier can be represented by n bits. r Require each key to be an integer in same range. r To get integer keys, hash original key.  e.g., key = h(“Led Zeppelin IV”)  This is why database is called a distributed “hash” table

28 How to assign keys to peers? r Central issue:  Assigning (key, value) pairs to peers. r Rule: assign to the peer that has the ID closest to key. r Convention in lecture: closest is the immediate successor of the key (or equal to) r Example: 4 bits; peers: 1,3,4,5,8,10,12,14;  key = 13, then successor peer = 14  key = 15, then successor peer = 1

Consistent Hashing r For n = 6, # of identifiers is 64. r The following DHT ring has 10 nodes and stores 5 keys. r The successor of key 10 is node 14.

Circular DHT (1) r Each peer only aware of immediate successor and predecessor.

31 Circle DHT (2) Who’s resp for key 1110 ? I am O(N) messages on avg to resolve query, when there are N peers 1110 Define closest as closest successor

32 Circular DHT with Shortcuts r Each peer keeps track of IP addresses of predecessor, successor, and short cuts. r Reduced from 6 to 3 messages. r Can design shortcuts such that O(log N) neighbors per peer, O(log N) messages per query Who’s resp for key 1110?

Scalable Key Location – Finger Tables finger table startsucc. keys finger table startsucc. keys finger table startsucc. keys For For For.

34 Peer Churn To handle peer churn, require each peer to know the IP address of its two successors Each peer periodically pings its two successors to see if they are still alive Limited solution for single join or single failure

Consistent Hashing – Node Join keys

Consistent Hashing – Node Dep keys

Problem of DHT r No good solution to maintain both scalable and consistent finger table under Churn. r Solution of BitTorrent  Maintain trackers (servers) as DHT, which are more reliable  Users queries trackers to get the locations of the file  File sharing are not structured. 37

38 DNS vs. DHT DNS r provides a host name to IP address mapping r relies on a set of special root servers r names reflect administrative boundaries r is specialized to finding named hosts or services DHT r can provide same service: Name = key, value = IP r requires no special servers r imposes no naming structure r can also be used to find data objects that are not tied to certain machines

39 End of Lecture05