How it works
Let’s say, a user from Washington D.C. needs to exchange data with a server in Hong Kong. After the request is sent, the network traffic passes through many different routers in different locations before it reaches Hong Kong. Then the server in Asia sends a response back to Washington D.C. Once the response terminates in Washington D.C., we can measure the RTT between these two locations.
The ping utility is one of the easiest ways to calculate RTT. Data packet delivery confirmation is sent over any TCP connections. RTT is measured in milliseconds. The lower the RTT, the better. Different methods are used to achieve this goal. For example, you can change the TLS/SSL handshake characteristics.
What affects RTT?
It’s worth noting that RTT can always change due to some external factors. Here are the main factors:
- The nature of the transmission medium. Technological characteristics of the Internet connections directly affect RTT. It’s obvious that satellite communication, wireless connection, and optical fiber have different properties.
- Local network (LAN) traffic. For example, if lots of users download heavy files simultaneously the Internet connection may considerably deteriorate.
- Response time. This is the potential bottleneck. If a server receives too many requests its response time gets longer than usual, and that results in RTT increase.
- The number of intermediated nodes. The greater the number of nodes there are on a data packet’s path, the slower it will be transmitted.
- Physical distance. Even if the transmission method is optimized to the fullest extent, it still takes time for a packet to cover the physical distance. That’s why if a starting point and a destination are located on different continents it certainly will take some time.
There are different ways of RTT reduction. One of them uses Content Delivery Networks to provide consumers with various types of media. CDN cache the content on different servers which are located to be physically close to potential users.