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 ...
随机推荐
- uva1627 Team them up!
注意这题要求互相认识不认识的人之间连一条线一个人在组1,那么不认识(互相认识)的人就在组0:同时这些人不认识的人就在组1.每个联通分量都可以独立推导,遇到矛盾则无解一个联通分量有一个核心,其他的点是分 ...
- SQL分组聚合查询练习(SQL Server和Oracle相似)20190514
先建表 CREATE TABLE [dbo].[orderdt_jimmy]( ,) NOT NULL, [order_nid] [int] NOT NULL, ) NOT NULL, [qty] [ ...
- js实现复制input的value到剪切板
<button class="button-code button-copy">复制链接</button><script> $(".b ...
- sql is null
select * from a or state is null)
- AspNetCore容器化(Docker)部署(一) —— 入门
一.docker注册安装 Windows Docker Desktop https://www.docker.com/products/docker-desktop Linux Docker CE h ...
- android问题
http://www.cnblogs.com/tianjian/category/330793.html
- hdu 6441 Find Integer(费马大定理+勾股数)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6441(本题来源于2018年中国大学生程序设计竞赛网络选拔赛) 题意:输入n和a,求满足等式a^n+b^ ...
- 常用字符串匹配算法(brute force, kmp, sunday)
1. 暴力解法 // 暴力求解 int Idx(string S, string T){ // 返回第一个匹配元素的位置,若没有匹配的子串,则返回-1 int S_size = S.length(); ...
- 关于nagios系统下使用shell脚本自定义监控插件的编写以及没有实时监控图的问题
关于nagios系统下shell自定义监控插件的编写.脚本规范以及没有实时监控图的问题的解决办法 在自已编写监控插件之前我们首先需要对nagios监控原理有一定的了解 Nagios的功能是监控服务和主 ...
- idea Error:(65, 27) java: 未结束的字符串文字
今天在使用IDEA的时候,出现了这个错误,原因项目文件编码不一致导致的,解决方法是: 将项目的文件编码全改成一致(UTF-8),如下图所示: