Data obtained from ping: is it round trip or one way?
I have 2 servers, each in two separate locations. I need to host an application on one, and the database server on the other.
From the app server, if I ping the database server, on average I get about 30ms.
My question is:
When I query the database from the app;
Is it going to take 30 ms + database_server_query_run_time
Or;
Is it going to take 30 ms + database_server_query_run_time + 30ms
I would like to understand this please.
------------------------------------------------------------------------------------------
It will usually take more then those two options.
Ping measures just the time from client, to server, and back again (rtt - round trip time)
Usually databases use TCP, so you first need to send a SYN packet to start the TCP handshake (to simplify let's say 15ms* + cpu time, then you recieve and SYN/ACK (15ms+cpu time), send back an ACK and a request (atleast 15ms + cpu time), then the time for the DB to process the query, and then the time (15ms + cpu) to get the data back, and a bit more to ack, and close the connection.
This is ofcourse not counting the authentication (username/password) to the database, and no encryption (ssl handshakes/DH or whatever is needed).
*half of a round trip time, assuming the route there and back is symmetrical (half the time to get there, and half to get back... cpu processing time for ping reply is very short)
Data obtained from ping: is it round trip or one way?的更多相关文章
- [Compose] Isomorphisms and round trip data transformations
What is Isomorphisms?We have a value x, then apply function 'to' and 'from' to value 'x', the result ...
- Round trip 流程图
更多原创测试技术文章同步更新到微信公众号 :三国测,敬请扫码关注个人的微信号,感谢!
- linux ping 命令解析
不管在windows平台,还是在linux平台,ping都是非常常用的网络命令:ping命令通过ICMP(Internet控制消息协议)工作:ping可以用来测试本机与目标主机是否联通.联通速度如何. ...
- Linux下实现ping功能
实现ping功能,就肯定要用到ping命令,那么在Linux下ping命令为: ping [-dfnqrRv][-c<完成次数>][-i<间隔秒数>][-I<网络界面&g ...
- Linux下ping命令参数详细解析
-a Audible ping. #Audible ping. -A Adaptive ping. Interpacket interval adapts to round-trip time, so ...
- Linux命令ping
原文 ping命令用来测试主机之间网络的连通性.执行ping指令会使用ICMP传输协议,发出要求回应的信息,若远端主机的网络功能没有问题,就会回应该信息,因而得知该主机运作正常. 语法 ping(选项 ...
- 【Shell】总结·linux shell脚本攻略
第一章:小试牛刀 #变量赋值 var = value不同于var=value 把var=value写成var = value是一个常见的错误 前者是赋值操作,后者是相等操作 #let命令可以直接执行基 ...
- [转]ping检测网络连接异常
转载地址:http://blog.csdn.net/feizxiang3/article/details/26672781 一般来说当出现网络无法连接时,习惯性的用ping命令来ping某个ip地址, ...
- 介绍ping中的TTL是什么意思
ping是icmp报文的一种应用.用来测试网络中各设备的连通性.在这几天的实验课上,我又用到了这个非常常用的命令,但是这次我发现了一些以前没有太注意的地方,那就是我在Ping不同的地址时所返回的TTL ...
随机推荐
- MySQL存储过程实现分页及变量的定义
delimiter是MySQL中的命令,这个命令与存储过程没什么关系. 其实就是告诉mysql解释器,该段命令是否已经结束了,mysql是否可以执行了. 即改变输入结束符. 默认情况下,delimit ...
- vue 组件相互传值
Part.1 传值几种方式 在写项目时,遇到组件传值问题,特此记录一波~~~ (1) 父传子 (2) 子传父 (2) 兄弟组件传值 Part.2 父传子 顾名思义,就是父组件传值给子组件 子 ...
- sklearn之SVC
sklearn.svm.SVC(C=1.0, kernel='rbf', degree=3, gamma='auto', coef0=0.0, shrinking=True, probability= ...
- myBatis.xml文档实例
单个参数:myBatis不会做特殊处理 #{参数名}: 取出参数值 多个参数: myBatis会做特殊处理 多个参数会被封装成一个MAP key:param1 param2.... param10,或 ...
- es6(三set和map数据结构)
es6中提供了一个新的数据结构Set,他有点类似数组,但和数组不同的是,在里面你如果写入重复的值的话,他不会显示重复值. const s =new Set(); [2,3,4,5,6,6,6,7,8, ...
- poj3710 Christmas Game
题目描述 题解: 树上删边. 对于奇数长度的环,可以看做一条边. 对于偶数长度的环,可以看做什么都没有. 没有特别好的解释…… 代码: #include<cstdio> #include& ...
- 条款17:以独立语句将newed对象置入智能指针(Store newed objects in smart pointers in standalone statements)
NOTE: 1.以独立语句将newed对象存储于智能指针内.如果不这样做,一旦异常被抛出,有可能导致难以察觉的资源泄漏.
- Verdi:内存不足
如果进行Verdi compile时,出现memory资源不够用.有可能case中出现了问题(或许发生了死循环,造成内存严重占用),此时尽量瘦身TC_FILE_LIST文件,缩小问题case的范围.
- pwnable.kr lotto之write up
源代码 : #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcnt ...
- 【02】SASS与SCSS
SASS语法 SASS语法也称之为SASS的缩进语法,其目的是担供一个更简洁的语法.对于一些人来说,更多的是基于于CSS的美学吸引力,用SASS来代替SCSS语法. SASS语法和CSS语法不一样,他 ...