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.

  • 相关阅读:
    SQL0668N Operation not allowed for reason code "3" on table "TEST". SQLSTATE=57016
    为何存在requests库,pycharm依然报错解决方法 --转载
    vmware12启动centos6.8报错ACPI:memory_hp:Memory online failed
    deepin升级之后打不开控制中心
    ubuntu中接一个摄像头会出现两个/dev/video
    VMware16中Ubuntu不显示共享文件夹的解决办法
    opencv获取当前帧数据问题
    libusb函数
    设置ubuntu、deppin(等linux系统)和window双系统启动引导顺序
    window和ubuntu双系统删除"ubuntu"
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6359785.html
Copyright © 2011-2022 走看看