Monday, February 25, 2008

Web Page Response Time

From the view point of an end-user, the total response time of a web page consists of one or more of the below sequences (depending on how many dependencies in the main request)
  1. Host name resolution (web server host name resolves to IP address), if not in system DNS cache
  2. Connect time (Browser establishes 3-way TCP handshake with web server)
  3. Server response time (once TCP connection establised, browser will send HTTP protocol to server and wait for the response)
  4. Delivery time (time between the first and the last bytes of requested content to be sent by server)

Two tools that you can used to find out all these timings.

Below diagram shows the correlation between the time recorded by these tools.

To further enhance your knowledge in HTTP protocol, EventHelix.com has documented a detailed HTTP Sequence Diagram to assist you to understand how the browser interacts with the web server. It even goes into details of how the browser spawns off 2nd thread to parallelise the download of other dependencies. Do you know that the HTTP/1.1 Specification stated that "A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy". Therefore, all modern browsers have their default connections set to 2. Of course you can always modify the default settings to gain parallelism. Alternatively, you can introduce an alias host name to 'fool' the browser to initiate another two more threads for this alias host.

Click on this Google search link to find out all the other protocol sequence diagrams from EventHelix.com.

Now you can have a deeper understanding of what's under the hood.

Labels: ,

0 Comments:

Post a Comment

<< Home