{"id":477,"date":"2012-04-23T23:41:13","date_gmt":"2012-04-24T03:41:13","guid":{"rendered":"http:\/\/www.rfdm.com\/blog\/?p=477"},"modified":"2013-04-20T10:59:51","modified_gmt":"2013-04-20T14:59:51","slug":"measuring-tcp-round-trip-times","status":"publish","type":"post","link":"https:\/\/www.rfdm.com\/blog\/?p=477","title":{"rendered":"Measuring TCP round-trip times, part 1: random thought"},"content":{"rendered":"<p>I would like to start measuring TCP round-trip times from my web server.  This could potentially be done on either my web server or my firewall.  But given that I&#8217;m already sniffing related packets on my web server for other purposes, it makes sense to do the work there, possibly in the same process.<\/p>\n<p>The idea is simple, and surely unoriginal: measure the time between my server&#8217;s SYN ACK and the client&#8217;s ACK of my SYN ACK (the last 2\/3 of a TCP handshake).  Record the wall time, the client IP address, and the time between the transmission of my SYN ACK and the reception of the client&#8217;s ACK of my SYN ACK.<\/p>\n<p>In the not too distant future, I will upgrade my desktop machine to FreeBSD 9.0-STABLE.  At that point I&#8217;ll start writing code that utilizes use the new h_ertt(4) kernel module.<\/p>\n<p>Much of what I want is actually client-anonymous: an idea of the distribution of network distance of the visitors of my web site.  I will want a facility to deal with crawlers, since they&#8217;re of less interest to me than human eyeballs and are likely to skew some statistics.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I would like to start measuring TCP round-trip times from my web server. This could potentially be done on either my web server or my firewall. But given that I&#8217;m already sniffing related packets on my web server for other purposes, it makes sense to do the work there, possibly in the same process. The &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.rfdm.com\/blog\/?p=477\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Measuring TCP round-trip times, part 1: random thought&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,12],"tags":[],"class_list":["post-477","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-software-development"],"_links":{"self":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=477"}],"version-history":[{"count":8,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/477\/revisions"}],"predecessor-version":[{"id":628,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/477\/revisions\/628"}],"wp:attachment":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}