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.
HTTP Transaction Delays的更多相关文章
- mybatis源码解读(四)——事务的配置
上一篇博客我们介绍了mybatis中关于数据源的配置原理,本篇博客介绍mybatis的事务管理. 对于事务,我们是在mybatis-configuration.xml 文件中配置的: 关于解析 < ...
- Method for training dynamic random access memory (DRAM) controller timing delays
Timing delays in a double data rate (DDR) dynamic random access memory (DRAM) controller (114, 116) ...
- JDBC Tutorials: Commit or Rollback transaction in finally block
http://skeletoncoder.blogspot.com/2006/10/jdbc-tutorials-commit-or-rollback.html JDBC Tutorials: Com ...
- InnoDB:Lock & Transaction
InnoDB 是一个支持事务的Engine,要保证事务ACID,必然会用到Lock.就像在Java编程一下,要保证数据的线程安全性,必然会用到Lock.了解Lock,Transaction可以帮助sq ...
- Basic Tutorials of Redis(8) -Transaction
Data play an important part in our project,how can we ensure correctness of the data and prevent the ...
- [解决方案]CREATE DATABASE statement not allowed within multi-statement transaction.
CREATE DATABASE statement not allowed within multi-statement transaction. 刚开始报这个错误的时候,我上度娘搜了一下. 别人是在 ...
- OLTP(on-line transaction processing)与OLAP(On-Line Analytical Processing)
OLTP与OLAP的介绍 数据处理大致可以分成两大类:联机事务处理OLTP(on-line transaction processing).联机分析处理OLAP(On-Line Analytical ...
- SQLIte Transaction
基本概念 事务(Transaction)是指一个或多个更改数据库的扩展.例如,如果您正在创建一个记录或者更新一个记录或者从表中删除一个记录,那么您正在该表上执行事务.重要的是要控制事务以确保数据的完整 ...
- Transaction事务传播行为种类PROPAGATION_REQUIRED
事务传播行为种类 Spring在TransactionDefinition接口中规定了7种类型的事务传播行为,它们规定了事务方法和事务方法发生嵌套调用时事务如何进行传播: 表1事务传播行为类型 事务传 ...
随机推荐
- tornado长轮询
1.什么是长轮询顾名思义,长轮询就是不停循环请求服务器,获取最新信息.长轮询分为两类:1)浏览器以固定时间间隔向服务器发送请求缺点是轮询频率要足够快,但又不能太频繁,否则当成百上千个客户端不断请求,会 ...
- Integer类型的数据比较大小
因为实体类用的是Integer包装类,所以是对象,不能直接比较大小, 一.一个Integer一个Int可以直接比较大小 二.两个Integer需要用.intValue()方法比较大小: 例如:cw.g ...
- lua工具库penlight--08额外的库(一)
额外的库 在这一节中的库不再被认为是Penlight的核心部分,但在需要时,仍提供专门的功能. 简单的输入的模式 Lua 的字符串模式匹配是非常强大,通常您将不需要传统的正则表达式库.即便如此,有时 ...
- C语言 · 打印1~100间的质数(素数)
算法提高 c++_ch02_04 时间限制:1.0s 内存限制:256.0MB 问题描述 输出1~100间的质数并显示出来.注意1不是质数. 输出格式 每行输出一个质数. 2 3 . ...
- xeno 实时性能测试 系统时钟1秒100个tick再测试
root@sama5d3-linux:/usr/bin ./latency -t0 -T25 -p100 == Sampling period: ...
- 亿级日PV的魅族云同步的核心协议与架构实践(转)
云同步的业务场景 这是魅族云同步的演进,第一张是M8.M9,然后到后面的是MX系统,M9再往后发展,我们的界面可以看到基本上是没有什么变化的,但本质发生了很大的变化,我们经过了一些协议优化,发展到今天 ...
- 脚本中出现“+ $'\r' : command not found
脚本中的部分应该是从doc直接拷过来的,造成回车符“\r”出现问题 通过将脚本内容在linux下拷贝一次,就解决了这个问题!
- MongoDB助力快速搭建物流订单系统
简介 快递物流系统里最常见的一种业务类型就是订单的查询和记录.订单的特点是随着递送过程,订单数据需要随时更新路径.数据结构上需要可以灵活应对,这点非常符合Document模型,并且MongoDB支持G ...
- 判断站点访问的终端类型(移动端还是pc端)的方法(转)
要了解某个网站是在移动设备上打开的还是在pc web浏览器中打开的,我们可以有以下综合的几种方式来搞定: 通过判断Request.UserAgent中的具体信息来分析判断,因为UserAgent包含了 ...
- VC++ GetSafeHwnd用法
GetSafeHwnd HWND GetSafeHwnd() const; 当我们想得到一个窗口对象(CWnd的派生对象)指针的句柄(HWND)时,最安全的方法是使用GetSafeHwnd()函数. ...