1 Lecture 3 Design Philosophy & Applications David Andersen School of Computer Science Carnegie Mellon University 15-441 Networking, Fall 2006

Slides:



Advertisements
Similar presentations
HyperText Transfer Protocol (HTTP)
Advertisements

Application Layer-11 CSE401N: Computer Networks Lecture-4 Application Layer Overview HTTP.
Chapter 9 Application Layer, HTTP Professor Rick Han University of Colorado at Boulder
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Chapter 2: Application Layer
HyperText Transfer Protocol (HTTP) Computer Networks Computer Networks Spring 2012 Spring 2012.
Lecture 3: Design Philosophy & Applications : Computer Networking Copyright © CMU,
Lecture 4: Design Philosophy & Applications : Computer Networking.
9/16/2003-9/18/2003 The Application Layer and Java Programming September 16-18, 2003.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Week 11: Application Layer1 Week 11: 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,
Web, HTTP and Web Caching
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
FTP File Transfer Protocol. Introduction transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from.
Network Protocols: Design and Analysis Polly Huang EE NTU
1 Transport Layer Computer Networks. 2 Where are we?
1 Application Layer Lecture 4 Imran Ahmed University of Management & Technology.
CS 3830 Day 7 Introduction : Application Layer 2 Processes communicating Process: program running within a host. r within same host, two processes.
FTP (File Transfer Protocol) & Telnet
Mail (smtp), VoIP (sip, rtp)
HTTP Reading: Section and COS 461: Computer Networks Spring
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Application Layer 2 Figures from Kurose and Ross
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
20-1 Last time □ NAT □ Application layer ♦ Intro ♦ Web / HTTP.
Week 11: Application Layer1 Web and HTTP First some jargon r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,…
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Introduction 1 Lecture 6 Application Layer (HTTP) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
2: Application Layer1 Web and HTTP First some jargon Web page consists of base HTML-file which includes several referenced objects Object can be HTML file,
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
CS640: Introduction to Computer Networks Aditya Akella Lecture 4 - Application Protocols, Performance.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
Sockets process sends/receives messages to/from its socket
Hui Zhang, Fall Computer Networking Web, HTTP, Caching.
1 HTTP EECS 325/425, Fall 2005 September Chapter 2: Application layer r 2.1 Principles of network applications m app architectures m app requirements.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
Application Layer 2-1 Chapter 2 Application Layer 2.2 Web and HTTP.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
CSE 524: Lecture 4 Application layer protocols. Administrative ● Reading assignment Chapter 2 ● Mid-term exam may be delayed to 11/2/2004 – Mostly on.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Application Layer 2-1 Lecture 4: Web and HTTP. Web and HTTP First, a review… web page consists of objects object can be HTML file, JPEG image, Java applet,
Important r There will be NO CLASS on Friday 1/30/2015! r Please mark you calendars 1.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
Advance Computer Networks Lecture#05 Instructor: Engr. Muhammad Mateen Yaqoob.
Web Technologies Lecture 1 The Internet and HTTP.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
Web Services. 2 Internet Collection of physically interconnected computers. Messages decomposed into packets. Packets transmitted from source to destination.
Overview of Servlets and JSP
CS640: Introduction to Computer Networks Aditya Akella Lecture 4 - Design Philosophy, Application Protocols and Performance.
1 COMP 431 Internet Services & Protocols HTTP Persistence & Web Caching Jasleen Kaur February 11, 2016.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
HyperText Transfer Protocol (HTTP) Deepti Kulkarni CISC 856: TCP/IP and Upper Layer Protocols Fall 2008 Acknowledgements Professor Amer Richi Gupta.
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.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Lecture 5 Internet Core: Protocol layers. Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP 
2: Application Layer 1 Chapter 2 Application Layer These ppt slides are originally from the Kurose and Ross’s book. But some slides are deleted and added.
Block 5: An application layer protocol: HTTP
Internet transport protocols services
CS 5565 Network Architecture and Protocols
15-441: Computer Networking
Hypertext Transfer Protocol (HTTP)
Lecture 3 Design Philosophy & Applications
CSCI-351 Data communication and Networks
Presentation transcript:

1 Lecture 3 Design Philosophy & Applications David Andersen School of Computer Science Carnegie Mellon University Networking, Fall

2 Lecture Overview l Last time: »Protocol stacks and layering »OSI and TCP/IP models »Application requirements from transport protocols l Internet Architecture l Project information l Application examples. »ftp »http l Application requirements. »“ilities” »Sharing

3 Internet Architecture l Background »“The Design Philosophy of the DARPA Internet Protocols” (David Clark, 1988). l Fundamental goal: Effective network interconnection l Goals, in order of priority: 1.Continue despite loss of networks or gateways 2.Support multiple types of communication service 3.Accommodate a variety of networks 4.Permit distributed management of Internet resources 5.Cost effective 6.Host attachment should be easy 7.Resource accountability

4 Priorities l The effects of the order of items in that list are still felt today »E.g., resource accounting is a hard, current research topic l Let’s look at them in detail

5 Survivability l If network disrupted and reconfigured »Communicating entities should not care! »No higher-level state reconfiguration »Ergo, transport interface only knows “working” and “not working.” Not working == complete partition. l How to achieve such reliability? »Where can communication state be stored? NetworkHost Failure handingReplication“Fate sharing” Net EngineeringToughSimple SwitchesMaintain stateStateless Host trustLessMore

6 Fate Sharing l Lose state information for an entity if (and only if?) the entity itself is lost. l Examples: »OK to lose TCP state if one endpoint crashes –NOT okay to lose if an intermediate router reboots »Is this still true in today’s network? –NATs and firewalls l Survivability compromise: Heterogenous network -> less information available to end hosts and Internet level recovery mechanisms Connection State State No State

7 Types of Service l Recall from last time TCP vs. UDP »Elastic apps that need reliability: remote login or »Inelastic, loss-tolerant apps: real-time voice or video »Others in between, or with stronger requirements »Biggest cause of delay variation: reliable delivery –Today’s net: ~100ms RTT –Reliable delivery can add seconds. l Original Internet model: “TCP/IP” one layer »First app was remote login… »But then came debugging, voice, etc. »These differences caused the layer split, added UDP l No QoS support assumed from below »In fact, some underlying nets only supported reliable delivery –Made Internet datagram service less useful! »Hard to implement without network support »QoS is an ongoing debate…

8 Varieties of Networks l Discussed a lot of this last time - »Interconnect the ARPANET, X.25 networks, LANs, satellite networks, packet networks, serial links… l Mininum set of assumptions for underlying net »Minimum packet size »Reasonable delivery odds, but not 100% »Some form of addressing unless point to point l Important non-assumptions: »Perfect reliability »Broadcast, multicast »Priority handling of traffic »Internal knowledge of delays, speeds, failures, etc. l Much engineering then only has to be done once

9 The “Other” goals l Management »Today’s Internet is decentralized - BGP »Very coarse tools. Still in the “assembly language” stage l Cost effectiveness »Economies of scale won out »Internet cheaper than most dedicated networks »Packet overhead less important by the year l Attaching a host »Not awful; DHCP and related autoconfiguration technologies helping. A ways to go, but the path is there l But…

10 Accountability l Huge problem. l Accounting »Billing? (mostly flat-rate. But phones are moving that way too - people like it!) »Inter-provider payments –Hornet’s nest. Complicated. Political. Hard. l Accountability and security »Huge problem. »Worms, viruses, etc. –Partly a host problem. But hosts very trusted. »Authentication –Purely optional. Many philosophical issues of privacy vs. security. l … Questions before we move on to the project?

11 Project 1 l Out today, due 10/12 »Two checkpoints, one in a week »Get started early. Get started early. Get … l Project partners »Choose very soon »Mail to George Nychis, l Project is an IRC server (Internet Relay Chat) »Text-based chat protocol. Features, in order: 1.Basic server (connect, channels, talk, etc.) can do now 2.Link-state routing to send messages to users across servers 1.OSPF lecture (9/28). Book: Chapter 4 (4.2) 3.Multicast routing to let channels span servers 1.MOSPF lecture (10/5). Paper: Deering “Multicast Routing”

12 Project 1 goals l Skill with real network applications »Select, dealing with multiple streams of data, remote clients and servers »Protocol “grunge” - headers, layers, packets, etc. »Be able to implement a [whatever] server. l Meet a real protocol »Create it from the spec l Familiarity with routing protocols and techniques l Don’t be dismayed by the size of the handout. It breaks down into reasonable chunks.

13 FTP: The File Transfer Protocol l Transfer file to/from remote host l Client/server model »Client: side that initiates transfer (either to/from remote) »Server: remote host l ftp: RFC 959 l ftp server: port 21 file transfer FTP server FTP user interface FTP client local file system remote file system user at host

14 Ftp: Separate Control, Data Connections l Ftp client contacts ftp server at port 21, specifying TCP as transport protocol l Two parallel TCP connections opened: »Control: exchange commands, responses between client, server. “out of band control” »Data: file data to/from server l Ftp server maintains “state”: current directory, earlier authentication FTP client FTP server TCP control connection port 21 TCP data connection port 20

15 Ftp Commands, Responses Sample Commands: l sent as ASCII text over control channel USER username PASS password LIST return list of files in current directory RETR filename retrieves (gets) file STOR filename stores (puts) file onto remote host Sample Return Codes l status code and phrase l 331 Username OK, password required l 125 data connection already open; transfer starting l 425 Can’t open data connection l 452 Error writing file

16 HTTP Basics l HTTP layered over bidirectional byte stream »Almost always TCP l Interaction »Client sends request to server, followed by response from server to client »Requests/responses are encoded in text l Stateless »Server maintains no information about past client requests

17 How to Mark End of Message? l Size of message  Content-Length »Must know size of transfer in advance l Delimiter  MIME style Content-Type »Server must “escape” delimiter in content l Close connection »Only server can do this

18 HTTP Request

19 HTTP Request l Request line »Method –GET – return URI –HEAD – return headers only of GET response –POST – send data to the server (forms, etc.) »URI –E.g. with a proxyhttp:// –E.g. /index.html if no proxy »HTTP version

20 HTTP Request l Request headers »Authorization – authentication info »Acceptable document types/encodings »From – user »If-Modified-Since »Referrer – what caused this page to be requested »User-Agent – client software l Blank-line l Body

21 HTTP Request Example GET / HTTP/1.1 Accept: */* Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Host: Connection: Keep-Alive

22 HTTP Response l Status-line »HTTP version »3 digit response code –1XX – informational –2XX – success l 200 OK –3XX – redirection l 301 Moved Permanently l 303 Moved Temporarily l 304 Not Modified –4XX – client error l 404 Not Found –5XX – server error l 505 HTTP Version Not Supported »Reason phrase

23 HTTP Response l Headers »Location – for redirection »Server – server software »WWW-Authenticate – request for authentication »Allow – list of methods supported (get, head, etc) »Content-Encoding – E.g x-gzip »Content-Length »Content-Type »Expires »Last-Modified l Blank-line l Body

24 HTTP Response Example HTTP/ OK Date: Tue, 27 Mar :49:38 GMT Server: Apache/ (Unix) (Red-Hat/Linux) mod_ssl/2.7.1 OpenSSL/0.9.5a DAV/1.0.2 PHP/4.0.1pl2 mod_perl/1.24 Last-Modified: Mon, 29 Jan :54:18 GMT ETag: "7a11f-10ed-3a75ae4a" Accept-Ranges: bytes Content-Length: 4333 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html …..

25 Cookies: Keeping “state” Many major Web sites use cookies Four components: 1) Cookie header line in the HTTP response message 2) Cookie header line in HTTP request message 3) Cookie file kept on user’s host and managed by user’s browser 4) Back-end database at Web site Example: »Susan accesses Internet always from same PC »She visits a specific e- commerce site for the first time »When initial HTTP requests arrives at site, site creates a unique ID and creates an entry in backend database for ID

26 Cookies: Keeping “State” (Cont.) client Amazon server usual http request msg usual http response + Set-cookie: 1678 usual http request msg cookie: 1678 usual http response msg usual http request msg cookie: 1678 usual http response msg cookie- specific action cookie- specific action server creates ID 1678 for user entry in backend database access Cookie file amazon: 1678 ebay: 8734 Cookie file ebay: 8734 Cookie file amazon: 1678 ebay: 8734 one week later:

27 Typical Workload (Web Pages) l Multiple (typically small) objects per page l File sizes »Why different than request sizes? »Also heavy-tailed –Pareto distribution for tail –Lognormal for body of distribution l Embedded references »Number of embedded objects = pareto – p(x) = ak a x -(a+1)

28 HTTP new features l Newer versions of HTTP add several new features (persistent connections, pipelined transfers) to speed things up. l Let’s detour into some performance evaluation and then look at those features

29 Packet Delay Prop + xmit 2*(Prop + xmit) 2*prop + xmit When does cut-through matter? Next: Routers have finite speed (processing delay) Routers may buffer packets (queueing delay) Store & Forward Cut-through

30 Packet Delay l Sum of a number of different delay components. l Propagation delay on each link. »Proportional to the length of the link l Transmission delay on each link. »Proportional to the packet size and 1/link speed l Processing delay on each router. »Depends on the speed of the router l Queuing delay on each router. »Depends on the traffic load and queue size ABACBD

31 A Word about Units l What do “Kilo” and “Mega” mean? »Depends on context l Storage works in powers of two. »1 Byte = 8 bits »1 KByte = 1024 Bytes »1 MByte = 1024 Kbytes l Networks work in decimal units. »Network hardware sends bits, not Bytes »1 Kbps = 1000 bits per second »To avoid confusion, use 1 Kbit/second l Why? Historical: CS versus ECE.

32 Application-level Delay Delay of one packet Average sustained throughput Delay * + Size Throughput * For minimum sized packet Units: seconds + bits/(bits/seconds)

Some Examples l How long does it take to send a 100 Kbit file? »Assume a perfect world »And a 10 Kbit file Throughput Latency 100 Kbit/s 500  sec 10 msec 100 msec 1 Mbit/s Mbit/s

34 Sustained Throughput l When streaming packets, the network works like a pipeline. »All links forward different packets in parallel l Throughput is determined by the slowest stage. »Called the bottleneck link l Does not really matter why the link is slow. »Low link bandwidth »Many users sharing the link bandwidth

35 One more detail: TCP l TCP connections need to be set up »“Three Way Handshake”: ClientServer SYN (Synchronize) SYN/ACK (Synchronize + Acknowledgement) ACK …Data… 2: TCP transfers start slowly and then ramp up the bandwidth used (so they don’t use too much)

36 HTTP 0.9/1.0 l One request/response per TCP connection »Simple to implement l Disadvantages »Multiple connection setups  three-way handshake each time –Several extra round trips added to transfer »Multiple slow starts

37 Single Transfer Example Client Server SYN ACK DAT FIN ACK 0 RTT 1 RTT 2 RTT 3 RTT 4 RTT Server reads from disk FIN Server reads from disk Client opens TCP connection Client sends HTTP request for HTML Client parses HTML Client opens TCP connection Client sends HTTP request for image Image begins to arrive

38 Performance Issues l Short transfers are hard on TCP »Stuck in slow start »Loss recovery is poor when windows are small l Lots of extra connections »Increases server state/processing l Servers also hang on to connection state after the connection is closed »Why must server keep these? »Tends to be an order of magnitude greater than # of active connections, why?

39 Netscape Solution l Mosaic (original popular Web browser) fetched one object at a time! l Netscape uses multiple concurrent connections to improve response time »Different parts of Web page arrive independently »Can grab more of the network bandwidth than other users l Doesn’t necessarily improve response time »TCP loss recovery ends up being timeout dominated because windows are small

40 Persistent Connection Solution l Multiplex multiple transfers onto one TCP connection l How to identify requests/responses »Delimiter  Server must examine response for delimiter string »Content-length and delimiter  Must know size of transfer in advance »Block-based transmission  send in multiple length delimited blocks »Store-and-forward  wait for entire response and then use content-length »Solution  use existing methods and close connection otherwise

41 Persistent Connection Solution Client Server ACK DAT ACK 0 RTT 1 RTT 2 RTT Server reads from disk Client sends HTTP request for HTML Client parses HTML Client sends HTTP request for image Image begins to arrive DAT Server reads from disk DAT

42 Persistent HTTP Nonpersistent HTTP issues: l Requires 2 RTTs per object l OS must work and allocate host resources for each TCP connection l But browsers often open parallel TCP connections to fetch referenced objects Persistent HTTP l Server leaves connection open after sending response l Subsequent HTTP messages between same client/server are sent over connection Persistent without pipelining: l Client issues new request only when previous response has been received l One RTT for each referenced object Persistent with pipelining: l Default in HTTP/1.1 l Client sends requests as soon as it encounters a referenced object l As little as one RTT for all the referenced objects

43 Persistent Connection Performance l Benefits greatest for small objects »Up to 2x improvement in response time l Server resource utilization reduced due to fewer connection establishments and fewer active connections l TCP behavior improved »Longer connections help adaptation to available bandwidth »Larger congestion window improves loss recovery

44 Remaining Problems l Serialized transmission »Much of the useful information in first few bytes –May be better to get the 1st 1/4 of all images than one complete image (e.g., progressive JPEG) »Can “packetize” transfer over TCP –Could use range requests l Application specific solution to transport protocol problems. :( »Solve the problem at the transport layer »Could fix TCP so it works well with multiple simultaneous connections –More difficult to deploy

45 Back to performance l We examined delay, l But what about throughput? l Important factors: »Link capacity »Other traffic

46 Bandwidth Sharing l Bandwidth received on the bottleneck link determines end-to-end throughput. l Router before the bottleneck link decides how much bandwidth each user gets. »Users that try to send at a higher rate will see packet loss l User bandwidth can fluctuate quickly as flows are added or end, or as flows change their transmit rate. BW Time 100

47 Fair Sharing of Bandwidth l All else being equal, fair means that users get equal treatment. »Sounds fair l When things are not equal, we need a policy that determines who gets how much bandwidth. »Users who pay more get more bandwidth »Users with a higher “rank” get more bandwidth »Certain classes of applications get priority BW Time 100

48 But It is Not that Simple Bottleneck

49 Network Service Models l Set of services that the network provides. l Best effort service: network will do an honest effort to deliver the packets to the destination. »Usually works l “Guaranteed” services. »Network offers (mathematical) performance guarantees »Can apply to bandwidth, latency, packet loss,.. l “Preferential” services. »Network gives preferential treatment to some packets »E.g. lower queuing delay l Quality of Service is closely related to the question of fairness.

50 Other Requirements l Network reliability. »Network service must always be available l Security: privacy, DOS,.. l Scalability. »Scale to large numbers of users, traffic flows,... l Manageability: monitoring, control,.. l Requirement often applies not only to the core network but also to the servers. l Requirements imposed by users and network managers.

51 Readings l “End-to-end arguments in system design”, Saltzer, Reed, and Clark, ACM Transactions on Computer Systems, November l “The design philosophy of the DARPA Internet Protocols”, Dave Clark, SIGCOMM 88.