What is responsible for Connect/Send/Wait in a HTTP request?

5,026

DNS is the time it takes for gethostbyname() to answer. It is the time that it takes for the hostname to get resolved. It depends on DNS server, network latency and DNS caches.

Connect is the time it takes to make the TCP connection. It depends on the network (end-to-end latency). For SSL add also the time it takes to establish the encrypted tunnel.

Send is the time it takes to send the HTTP request and can the client can see if the data was send because it is receiving ACKs from the remote server.

Wait is the time that it takes for the remote server to process the request. No network is involved.

Receive is the time it takes to receive the HTTP response (the header and the data).

You will have some important events when the header was received, when the server has flushed the partial output and when the entire content was received - some of them triggers JavaScript events.

See also:

Share:
5,026

Related videos on Youtube

Googlebot
Author by

Googlebot

intentionally left blank

Updated on September 18, 2022

Comments

  • Googlebot
    Googlebot over 1 year

    Services like pingdom and Google speed analyze the time consumed for reading a HTTP file. This includes

    DNS: Obviously, DNS management to interpret the namespaces is responsible.
    Connect: ???
    Send: ???
    Wait: ???
    Receive: Disk speed in reading the file should be mainly responsible for this step.
    

    As I explored, the Send step usually tends to 0. I think web server is mainly responsible for the Connect step to process the request. As well as the responsibility of web server in the Wait step, the Scripting Language should also be responsible.

    Could you please help me to better understand what are bottlenecks for each step and how to reduce the time needed for each step.

    Note: Imagine that bandwidth and connect speed is not a limit in both server and client machines.

    P.S. I strongly appreciate introducing articles clarifying this issue, as it was difficult to find by search (probably due to the lack of distinguishing keywords). Thanks!