Presentation is loading. Please wait.

Presentation is loading. Please wait.

In-class Paper Review #2 “Improving World Wide Web Latency” By Venkata N. Padmanabhan Department of Computer Science Southern Illinois University Edwardsville.

Similar presentations


Presentation on theme: "In-class Paper Review #2 “Improving World Wide Web Latency” By Venkata N. Padmanabhan Department of Computer Science Southern Illinois University Edwardsville."— Presentation transcript:

1 In-class Paper Review #2 “Improving World Wide Web Latency” By Venkata N. Padmanabhan Department of Computer Science Southern Illinois University Edwardsville Spring, 2006 Dr. Hiroshi Fujinoki E-mail: hfujino@siue.edu CS 587 High-Speed Networks Padmanabhan/000

2 CS 587 High-Speed Networks Padmanabhan/001 Problems in HTTP (HTTP 1.0) = The required time after a web user makes a request for a web page until the page is (completely) displayed at the user’s local monitor Possible contributing factors in latency Transmission bandwidth Network congestion (due to high queuing delay at intermediate routers) Client/server host resources (we can never transmit more than link capacity) The problem addressed by the author Latency Example Transmitting a 1 Mbyte file across a 1Mbps link Never be less than 1 second Propagation delay The author claims that this is the most serious limiting factor in web latency

3 CS 587 High-Speed Networks Padmanabhan/002 Why is “propagation delay” is the most significant factor? Propagation delay is a function of the constant propagation speed of light It is the factor money can not improve anything  It is proportional to the physical end-to-end distance  If the distance becomes doubled, the latency will be doubled  You can not improve it by upgrading to a faster hardware  Reducing traffic load will not reduce the latency  Even transmitting 1 bit over a coast-to-coast will take at least 70 ms using the fastest Internet backbone (> 10Tbps)

4 CS 587 High-Speed Networks Padmanabhan/003 The two approaches used by the author to improve web latency Hide the propagation delay, if it is impossible to eliminate There are some delay components that are impossible to eliminate, then, try to hide it. Approach #2 Approach #1 Eliminate the propagation delay as much as possible. If there is unnecessary delay components and if it is Possible to eliminate, eliminate it!

5 CS 587 High-Speed Networks Padmanabhan/004 The three techniques the author proposed to hide the web latency  HTTP 1.1 Persistent Connection  HTTP 1.1 Pipelining  Pre-fetching web pages in conjunction client-side caching Already officially adopted in HTTP 1.1 Pre-fetch prediction algorithm Implementation in HTTP Backward compatibility is important Implemented by most of the web browsers

6 CS 587 High-Speed Networks Padmanabhan/005 How to eliminate latency? Eliminate unnecessary message round-trips in HTTP. Analysis Phase #1 Understand the essences in HTTP (HTTP 1.0) (The author called this “a brief sketch of the HTTP protocol” (page 3)) HTTP protocol is layered over a reliable bidirectional byte stream (i.e., socket) normally TCP. Each HTTP interaction consists of a request sent from a client to the server, followed by a response sent from the server (i.e., client-server model). Client requests are implemented by: - Methods (GET, POST, etc) - URL (Universal Resource Locator) - HTTP header (Specific data structure to transmit client information)

7 CS 587 High-Speed Networks Padmanabhan/006 Analysis Phase #1 (continued) Client requests are parsed by the server The server takes the action(s) according to the specified method. The server sends a response to the client (meta-information) The server sends a status code HTTP 200 OK HTTP 404 Page Not Found HTTP 500 Access Refused content-length The server transmits the content of a web page (just a file)

8 CS 587 High-Speed Networks Padmanabhan/007 Analysis Phase #1 (continued) Web Browser Web Server Connection request for a stream socket (=TCP) accept connect Socket type: AF_INET SOCK_STREAM

9 CS 587 High-Speed Networks Padmanabhan/008 Analysis Phase #1 (continued) Web Browser Web Server A socket (= TCP) connection as a bi-directional data channel

10 Web Browser CS 587 High-Speed Networks Padmanabhan/009 Analysis Phase #1 (continued) Web Server URL: www.siue.edu Method: GET index.html HTTP/1.0 HTTP header Parse the client request Take the requested action Transmit a result status code (HTTP 200 OK) HTTP 200 OK Transmit server-side meta-information Context-length Contents of a file Transmit the contents of the requested web file

11 CS 587 High-Speed Networks Identify unnecessary round trips Analysis Phase #2 Eliminate unnecessary message round-trips in HTTP, but we need to identify which round-trips are unnecessary. client server SYN SYN-ACK ACK DAT ACK DAT ACK DAT      FIN ACK FIN ACK SYN SYN-ACK ACK DAT 0 RTT 1 RTT 2 RTT 3 RTT 4 RTT Establish stream socket TCP 3-way handshake Transmit GET request for index.html top page ACK can be piggy-backed to the GET payload packet Receive the top page Parse other required files Establish stream socket TCP 3-way handshake Transmit GET request for another file Receive the requested page TCP prepares data structure for a connection Server establishes a connection Server accesses its local HDD Server drops the connection TCP prepares data structure for a connection Padmanabhan/010

12 CS 587 High-Speed Networks Padmanabhan/012 Which round-trips are unnecessary? How can we eliminate those unnecessary round trips?? Padmanabhan said, “almost all of the unnecessary round trips may be eliminated by surprisingly simple changes in HTTP protocol. Analysis Phase #2 (continued)

13 CS 587 High-Speed Networks Padmanabhan/013 Analysis Phase #2 (continued) Significant expected benefits in eliminating unnecessary round-trips (page 5) Reducing number of round-trips Shorter web latency Reducing processing overhead at both client and server Reducing connections - Allocating new ports - Creating/deleting TCP data structures - Creating/deleting processes/threads Reducing application-level workload - Overhead for authentication - Overhead for message encryption Less probability of request refusal due to the max. # of TCP connections Significant for busy/popular web servers The author described these to convince The significance of his proposed solutions

14 CS 587 High-Speed Networks Padmanabhan/014 Analysis Phase #2 (continued) TCP TIME_WAIT and CLOSE_WAIT TCP TIME_WAIT: A host waits for up to a few minutes (4 min. in default) after FIN message has been released. For a busy/popular web server, the number of TCP connections opened (and those still not dropped) will quickly hit the max. number of connections allowed at a server host.

15 CS 587 High-Speed Networks Padmanabhan/015 Analysis Phase #2 (continued) At a busy/popular web server host, the TCP connections (entries in the TCP connection management table) tend to increase in a short time.

16 CS 587 High-Speed Networks Padmanabhan/016 Another thought to convince the importance in reducing the number of round-trips The average file size in web application is very small  Use of a subjective word - Mean document size is 13 Kbytes (12,925 bytes) - The median is 1.77 Kbytes (1,770 bytes) - 12,727 messages are zero-contents message (TCP+IP header only) The statistics from 200,000 HTTP retrievals say: Most of the files are less than 1.7KB. Occasional large files Only 40 bytes in a message

17 CS 587 High-Speed Networks Padmanabhan/017 Another thought to convince the importance in reducing the number of round-trips The average file size in web application is very small  Use of a subjective word client server Small messages S1S1 R1R1 U 1 = R 1 /S 1 Large messages client server S2S2 R2R2 U 2 = R 2 /S 2 U 1 < U 2

18 CS 587 High-Speed Networks Solution #1: Persistent Connection client server SYN SYN-ACK ACK DAT ACK DAT ACK DAT      FIN ACK FIN ACK SYN SYN-ACK ACK DAT Padmanabhan/018 Keep a stream socket connection (= TCP connection) until you download all the files

19 CS 587 High-Speed Networks Solution #1: Persistent Connection client server SYN SYN-ACK ACK DAT ACK DAT ACK DAT      ACK DAT Padmanabhan/019 Keep a stream socket connection (= TCP connection) until you download all the files DAT      Round trips reduced Reduced TIME_WAIT Reduced CLOSE_WAIT

20 CS 587 High-Speed Networks Padmanabhan/020 Implementation details in Persistent Connection 1. Detection of the end of transmissions (page 8) 2. Backward-compatible extension of HTTP 1.0 (page 9) How can the client know the end of transmissions? Boundary delimiter Blocked data transmission protocol Store-and-forward HTTP PC-enabled server should be able to handle PC-non-enabled HTTP clients HTTP PC-enabled client should be able to handle PC-non-enabled HTTP servers OS-kernel and TCP should not be changed

21 CS 587 High-Speed Networks client server SYN SYN-ACK ACK DAT ACK DAT ACK DAT      ACK DAT Padmanabhan/021 DAT Solution #2: HTTP Pipelining An improvement over Persistent Connection client server SYN SYN-ACK ACK DAT ACK DAT ACK DAT      ACK DAT This parallel HTTP requests are impossible in PC (since this requires multiple connections)

22 CS 587 High-Speed Networks Padmanabhan/022 Solution #2: HTTP Pipelining client server SYN SYN-ACK ACK DAT ACK DAT ACK DAT      ACK DAT GET-ALL DAT Parse the index.html Identify all the files needed for this page Request all files

23 Web Browser CS 587 High-Speed Networks Padmanabhan/023 Web Server URL: www.siue.edu Method: GETALL ***** HTTP/1.0 HTTP header Parse the client request Take the requested action HTTP 200 OK Solution #2: HTTP Pipelining A requested file HTTP Header FTTP Header contains “context-length” field

24 US Home CNN Top CS 587 High-Speed Networks Padmanabhan/024 Solution #2: HTTP Pipelining HTTP Pipelining working with the client-side cache

25 Web Browser CS 587 High-Speed Networks Padmanabhan/025 Web Server URL: www.siue.edu Method: GETLIST ***** HTTP/1.0 HTTP header HTTP 200 OK Solution #2: HTTP Pipelining A requested file Only the files missing in the client’s cache will be requested Using HTTP Pipelining CNN_icon.gif US_Home.gif NetScape.gif ToolBar.gif                   Client-Side cache Parse the client request Take the requested action

26 CS 587 High-Speed Networks Padmanabhan/026 Solution #3: HTTP Pre-Fetching CNN TOP US Home Weather page Travel page

27 CS 587 High-Speed Networks Solution #3: HTTP Pre-Fetching client server SYN SYN-ACK ACK GETALL ALL FILES GETALL ALL FILES ALL FILES GETALL Initial TCP hand- shaking delay Requesting TOP page Browsing time Requesting US home page Browsing time Requesting weather page Padmanabhan/027

28 CS 587 High-Speed Networks Solution #3: HTTP Pre-Fetching client server SYN SYN-ACK ACK GETALL ALL FILES GETALL ALL FILES ALL FILES GETALL Initial TCP hand- shaking delay Requesting TOP page Browsing time Requesting US home page Browsing time Requesting weather page Padmanabhan/028 Latency as observed by a web user Latency as observed by a web user Latency as observed by a web user Utilize the time for user’s browsing to transmit next data

29 CS 587 High-Speed Networks Solution #3: HTTP Pre-Fetching client server SYN SYN-ACK ACK GETALL ALL FILES GETALL ALL FILES ALL FILES GETALL Initial TCP hand- shaking delay Requesting TOP page Browsing time Padmanabhan/029 Latency as observed by a web user Requesting US home page Browsing time Requesting weather page Latency as observed by a web user Latency as observed by a web user

30 CS 587 High-Speed Networks Solution #3: HTTP Pre-Fetching client server SYN SYN-ACK ACK GETALL ALL FILES GETALL ALL FILES ALL FILES GETALL Initial TCP hand- shaking delay Requesting TOP page Browsing time Padmanabhan/030 Latency as observed by a web user Browsing time

31 CS 587 High-Speed Networks Solution #3: HTTP Pre-Fetching client server SYN SYN-ACK ACK GETALL ALL FILES GETALL ALL FILES ALL FILES GETALL Initial TCP hand- shaking delay Requesting TOP page Browsing time Padmanabhan/031 Browsing time Need to predict which files will be requested Need to predict which files will be requested

32 CS 587 High-Speed Networks Solution #3: HTTP Pre-Fetching Padmanabhan/032 How can we predict next files to be requested by a web user? New web customer Files in US Home Files in Weather Page Files in Europe Home 0.5 0.2 0.3 0.2 Files in Another Page Files in Another Page 0.25 index.html (Top page) This figure almost stolen from Padmanabhan’s paper This figure almost stolen from Padmanabhan’s paper

33 CS 587 High-Speed Networks Solution #3: HTTP Pre-Fetching Padmanabhan/033 How to calculate the probability of a group of files to be requested next? Web Server Requests from clients Httpd Prefecthd OS/file-system Log web requests

34 Prediction Window CS 587 High-Speed Networks Solution #3: HTTP Pre-Fetching Padmanabhan/034 How to calculate the probability of a group of files to be requested next? Concept of “Prediction Window” index.html (Top page) - “Prediction Window” = An array of “slots” - Each slot remembers a file requested - Remember as many files as in the prediction window

35 CS 587 High-Speed Networks Solution #3: HTTP Pre-Fetching Padmanabhan/035 How to calculate the probability of a group of files to be requested next? The dependency (prediction) graph has an arch from a file A (or a group of files) to another file B, if and only if: - B was accessed within w accesses after A (w is the window size) The probability (weight) of an arc is the ratio of (the number of accesses to B) to (the number of accesses to A). INOUT Prediction Window as FIFO Queue When a page entry is kicked put or re-inserted, all the files after the one is recorded


Download ppt "In-class Paper Review #2 “Improving World Wide Web Latency” By Venkata N. Padmanabhan Department of Computer Science Southern Illinois University Edwardsville."

Similar presentations


Ads by Google