zoukankan      html  css  js  c++  java
  • HTTP Transaction Delays

    w客户端、服务器超载

    HTTP The Definitive Guide

    与建立TCP连接以及传输请求和相应报文的时间相比,事务处理的时间是很短的。除非客户端或服务器超载或正在处理复杂
    的动态资源,否则HTTP时延主要就是由TCP网络时延构成的。

    Notice that the transaction processing time can be quite small compared to the time required to set up
    TCP connections and transfer the request and response messages. Unless the client or server is
    overloaded or executing complex dynamic resources, most HTTP delays are caused by TCP network
    delays.

    There are several possible causes of delay in an HTTP transaction:

    1.

    A client first needs to determine the IP address and port number of the web server from the
    URI. If the hostname in the URI was not recently visited, it may take tens of seconds to
    convert the hostname from a URI into an IP address using the DNS resolution infrastructure.
    [3]

    [3]
    Luckily, most HTTP clients keep a small DNS cache of IP addresses for recently accessed sites.
    When the IP address is already "cached" (recorded) locally, the lookup is instantaneous. Because
    most web browsing is to a small number of popular sites, hostnames usually are resolved very
    quickly.
    2.

    Next, the client sends a TCP connection request to the server and waits for the server to send
    back a connection acceptance reply. Connection setup delay occurs for every new TCP
    connection. This usually takes at most a second or two, but it can add up quickly when
    hundreds of HTTP transactions are made.
    3.

    Once the connection is established, the client sends the HTTP request over the newly
    established TCP pipe. The web server reads the request message from the TCP connection as
    the data arrives and processes the request. It takes time for the request message to travel over
    the Internet and get processed by the server.
    4.

    The web server then writes back the HTTP response, which also takes time.

    The magnitude of these TCP network delays depends on hardware speed, the load of the network and
    server, the size of the request and response messages, and the distance between client and server. The
    delays also are significantly affected by technical intricacies of the TCP protocol.

  • 相关阅读:
    Sliverlight之 矢量绘图
    Silverlight之 xaml布局
    七天学会ASP.NET MVC(七)——创建单页应用
    MVC视图之间调用方法总结
    C#取得程序的根目录以及判断文件是否存在
    七天学会ASP.NET MVC (六)——线程问题、异常处理、自定义URL
    [C#] .NET4.0中使用4.5中的 async/await 功能实现异步
    C#中StreamReader读取中文文本出现乱码的解决方法
    七天学会ASP.NET MVC (五)——Layout页面使用和用户角色管理
    常用正则表达式
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6359785.html
Copyright © 2011-2022 走看看