15-744: Computer Networking L-21 Applications. L -21; 11-21-02© Srinivasan Seshan, 20022 Next Lecture: Application Networking HTTP Adaptive applications.

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
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,
15-441: Computer Networking The “Web” Thomas Harris (slides from Srini Seshan’s Fall ’01 course)
15-744: Computer Networking L-20 Applications. L -20; © Srinivasan Seshan, Application Networking HTTP APIs Assigned reading [BSR99] An Integrated.
HTTP and Web Content Delivery COS 461: Computer Networks Spring 2011 Mike Freedman
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.
Web, HTTP and Web Caching
2: Application Layer1 Chapter 2: Application Layer Our goals: r conceptual, implementation aspects of network application protocols m transport-layer service.
15-744: Computer Networking L-20 Applications. L -20; © Srinivasan Seshan, Next Lecture: Application Networking HTTP Adaptive applications.
1 K. Salah Module 2.1: Application Layer Application-level protocols provide high-level services –Web and HTTP –DNS –Electronic mail –Remote login –FTP.
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.
Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2009 (MW 1:30-2:50 in CS105) Mike Freedman Teaching Assistants:
Network Protocols: Design and Analysis Polly Huang EE NTU
The Internet Congestion Manager Hari Balakrishnan MIT LCS
1 Transport Layer Computer Networks. 2 Where are we?
CS640: Introduction to Computer Networks Aditya Akella Lecture 18 - The Web, Caching and CDNs.
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,…
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
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,
CS640: Introduction to Computer Networks Aditya Akella Lecture 4 - Application Protocols, Performance.
An Integrated Congestion Management Architecture for Internet Hosts Hari Balakrishnan MIT Lab for Computer Science
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.
1 CS 4396 Computer Networks Lab TCP/IP Networking An Example.
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.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
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.
The Internet Congestion Manager Hari Balakrishnan MIT Laboratory for Computer Science CM team Dave Andersen, Deepak Bansal, Dorothy.
Web Technologies Lecture 1 The Internet and HTTP.
HTTP Here, we examine the hypertext transfer protocol (http) – originally introduced around 1990 but not standardized until 1997 (version 1.0) – protocol.
EE 122: Lecture 21 (HyperText Transfer Protocol - HTTP) Ion Stoica Nov 20, 2001 (*)
CS 6401 The World Wide Web Outline Background Structure Protocols.
Overview of Servlets and JSP
Computer Networking Lecture 25 – The Web.
An End-System Architecture for Unified Congestion Management Hariharan S. Rahul, Hari Balakrishnan, Srinivasan Seshan MIT Lab for Computer Science
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.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
Computer Networking The Web. 2 Web history 1945: Vannevar Bush, “As we may think”, Atlantic Monthly, July, describes the idea of a distributed.
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.
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
HTTP request message: general format
Internet transport protocols services
CS 5565 Network Architecture and Protocols
An Integrated Congestion Management Architecture for Internet Hosts
15-441: Computer Networking
Hypertext Transfer Protocol (HTTP)
CSCI-351 Data communication and Networks
Presentation transcript:

15-744: Computer Networking L-21 Applications

L -21; © Srinivasan Seshan, Next Lecture: Application Networking HTTP Adaptive applications Assigned reading [BSR99] An Integrated Congestion Management Architecture for Internet Hosts [CT90] Architectural Consideration for a New Generation of Protocols

L -21; © Srinivasan Seshan, Overview HTTP Basics HTTP Fixes ALF Congestion Manager

L -21; © Srinivasan Seshan, HTTP Basics HTTP layered over bidirectional byte stream Almost always TCP Interaction Client sends request to server, followed by response from server to client Requests/responses are encoded in text Stateless Server maintains no information about past client requests

L -21; © Srinivasan Seshan, How to Mark End of Message? Size of message  Content-Length Must know size of transfer in advance Delimiter  MIME-style Content-Type Server must “escape” delimiter in content Close connection Only server can do this

L -21; © Srinivasan Seshan, HTTP Request Request line Method GET – return URI HEAD – return headers only of GET response POST – send data to the server (forms, etc.) URL (relative) E.g., /index.html HTTP version

L -21; © Srinivasan Seshan, HTTP Request (cont.) 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 Blank-line Body

L -21; © Srinivasan Seshan, HTTP Request

L -21; © Srinivasan Seshan, 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

L -21; © Srinivasan Seshan, HTTP Response Status-line HTTP version 3 digit response code 1XX – informational 2XX – success 200 OK 3XX – redirection 301 Moved Permanently 303 Moved Temporarily 304 Not Modified 4XX – client error 404 Not Found 5XX – server error 505 HTTP Version Not Supported Reason phrase

L -21; © Srinivasan Seshan, HTTP Response (cont.) 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 Blank-line Body

L -21; © Srinivasan Seshan, 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 …..

L -21; © Srinivasan Seshan, 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 access Internet always from same PC She visits a specific e- commerce site for first time When initial HTTP requests arrives at site, site creates a unique ID and creates an entry in backend database for ID

L -21; © Srinivasan Seshan, 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:

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

L -21; © Srinivasan Seshan, HTTP 0.9/1.0 One request/response per TCP connection Simple to implement Disadvantages Multiple connection setups  three-way handshake each time Several extra round trips added to transfer Multiple slow starts

L -21; © Srinivasan Seshan, 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

L -21; © Srinivasan Seshan, More Problems Short transfers are hard on TCP Stuck in slow start Loss recovery is poor when windows are small Lots of extra connections Increases server state/processing Server also forced to keep TIME_WAIT connection state Why must server keep these? Tends to be an order of magnitude greater than # of active connections, why?

L -21; © Srinivasan Seshan, Overview HTTP Basics HTTP Fixes ALF Congestion Manager

L -21; © Srinivasan Seshan, Netscape Solution Use multiple concurrent connections to improve response time Different parts of Web page arrive independently Can grab more of the network bandwidth than other users Doesn’t necessarily improve response time TCP loss recovery ends up being timeout dominated because windows are small

L -21; © Srinivasan Seshan, Persistent Connection Solution Multiplex multiple transfers onto one TCP connection Serialize transfers  client makes next request only after previous response How to demultiplex requests/responses Content-length and delimiter  same problems as before Block-based transmission – send in multiple length delimited blocks Store-and-forward – wait for entire response and then use content-length PM95 solution – use existing methods and close connection otherwise

L -21; © Srinivasan Seshan, Persistent Connection Example ClientServer 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

L -21; © Srinivasan Seshan, Persistent Connection Solution Serialized requests do not improve response time Pipelining requests Getall – request HTML document and all embeds Requires server to parse HTML files Doesn’t consider client cached documents Getlist – request a set of documents Implemented as a simple set of GETs Prefetching Must carefully balance impact of unused data transfers Not widely used due to poor hit rates

L -21; © Srinivasan Seshan, Persistent Connection Performance Benefits greatest for small objects Up to 2x improvement in response time Server resource utilization reduce due to fewer connection establishments and fewer active connections TCP behavior improved Longer connections help adaptation to available bandwidth Larger congestion window improves loss recovery

L -21; © Srinivasan Seshan, Remaining Problems Application specific solution to transport protocol problems Stall in transfer of one object prevents delivery of others Serialized transmission Much of the useful information in first few bytes Can “packetize” transfer over TCP HTTP 1.1 recommends using range requests MUX protocol provides similar generic solution Solve the problem at the transport layer Tcp-Int/CM/TCP control block interdependence

L -21; © Srinivasan Seshan, Overview HTTP Basics HTTP Fixes ALF Congestion Manager

L -21; © Srinivasan Seshan, Integrated Layer Processing (ILP) Layering is convenient for architecture but not for implementations Combining data manipulation operations across layers provides gains E.g. copy and checksum combined provides 90Mbps vs. 60Mbps separated Protocol design must be done carefully to enable ILP Data manipulation more expensive than control Presentation overhead/application-specific processing >> other data manipulation processing Target for ILP optimization

L -21; © Srinivasan Seshan, Application Lever Framing (ALF) Objective: enable application to process data ASAP Application response to loss Retransmit (TCP applications) Ignore (UDP applications) Recompute/send new data (clever application) Expose unit of application processing (ADU) to protocol stack Lower protocol layers should maintain framing

L -21; © Srinivasan Seshan, Application Data Units Requirements ADUs can be processed in any order Naming of ADUs should help identify position in stream Size Enough to process independently Impact on loss recovery ADU becomes unit of loss recovery What if size is very large?

L -21; © Srinivasan Seshan, Overview HTTP Basics HTTP Fixes ALF Congestion Manager

L -21; © Srinivasan Seshan, Socket API Connection establishment Connect – active connect Bind, listen, accept – passive connect Transmission/reception Send & sendto Recv & recvfrom Pass large buffer to protocol stack Protocol transmits at either congestion controlled or line rate Configuration/status E.g advertised window, nagle, multicast membership, etc. Setsockopt, getsockopt Very little information really passed to/controlled by application

L -21; © Srinivasan Seshan, Problems with Concurrent Flows Compete for resources N “slow starts” = aggressive No shared learning = inefficient f(n) f2 f1 Server Client Abstract all congestion-related information into one location Internet

L -21; © Srinivasan Seshan, Problems Adapting to Network State TCP hides network state New applications may not use TCP Often do not adapt to congestion Need system that helps applications learn and adapt to congestion f1 Server Client ? Internet

L -21; © Srinivasan Seshan, API High Level View IP HTTPVideo1 TCP2UDP AudioVideo2 All congestion management tasks performed in CM Applications learn and adapt using API All congestion management tasks performed in CM Applications learn and adapt using API Congestion Manager Per-macroflow statistics (cwnd, rtt, etc.) TCP1

L -21; © Srinivasan Seshan, The CM Architecture Transmitting Application (TCP, conferencing app, etc) Prober Congestion Controller Scheduler Responder Congestion Detector SenderReceiver CM Protocol API Receiving Application Protocol

L -21; © Srinivasan Seshan, Congestion Controller Responsible for deciding when to send a packet Window-based AIMD with traffic shaping Exponential aging when feedback low Halve window every RTT (minimum) Plug in other algorithms Selected on a “macro-flow” granularity

L -21; © Srinivasan Seshan, Scheduler Responsible for deciding who should send a packet Hierarchical round robin Hints from application or receiver Used to prioritize flows Plug in other algorithms Selected on a “macro-flow” granularity Prioritization interface may be different

L -21; © Srinivasan Seshan, Transmission API Buffered send cm_send(data, length) Request/callback-based send cm_request( ) cmapp_send( ) App CM IP send( ) cm_notify(nsent)

L -21; © Srinivasan Seshan, Transmission API (cont.) Request API: asynchronous sources wait for (some_events) { get_data( ); send( ); } Synchronous sources do_every_t_ms { get_data( ); send( ); } Solution: cmapp_update(rate, srtt) callback

L -21; © Srinivasan Seshan, Feedback about Network State Monitoring successes and losses Application hints Probing system Notification API (application hints) Application calls cm_update(nsent, nrecd, congestion indicator, rtt)

L -21; © Srinivasan Seshan, Probing System Receiver modifications necessary Support for separate CM header Uses sequence number to detect losses Sender can request count of packets received Receiver modifications detected/negotiated via handshake Enables incremental deployment IP payload CM Header IP Header IP Payload

L -21; © Srinivasan Seshan, How will applications use CM? TCP Asynchronous API Congestion controlled UDP Buffered API Conferencing applications Synchronous API for real-time streams Combination of others for other streams

L -21; © Srinivasan Seshan, TCP/CM CM Application IP 2. cm_open 1. connect3. write 4. cm_request 6. transmit 5. cmapp_send 8. recv ACK 7. cm_notify 7. cm_request 9. cm_update 11. cm_close 10. close

L -21; © Srinivasan Seshan, CM Web Performance With CM TCP Newreno Time Sequence number CM greatly improves predictability and consistency CM greatly improves predictability and consistency

L -21; © Srinivasan Seshan, Layered Streaming Audio TimeSequence number Competing TCP TCP/CM Audio/CM Audio adapts to available bandwidth Combination of flows compete equally with normal TCP Audio adapts to available bandwidth Combination of flows compete equally with normal TCP

L -21; © Srinivasan Seshan, CM Summary Enables proper and stable congestion behavior Provides simple API that enables application to learn and adapt to network state Improves consistency and predictability of network transfers Provides benefit even when deployed at senders alone

L -21; © Srinivasan Seshan, Next Lecture: Caching & CDN’s Web caching hierarchies Content distribution networks Assigned reading [FCAB98] Summary Cache: A Scalable Wide- Area Cache Sharing Protocol [K+99] Web Caching with Consistent Hashing