Latency is the delay between a user’s action and a web application’s response to that action, often referred to in networking terms as the total round trip time it takes for a data packet to travel.
How to reduce latency
Content Delivery Network (CDN) providers provide customers with private networks that allow them to bypass the public internet. Therefore, these private networks reduce latency by providing more efficient paths for data packets to travel on.
Also the caching techniques is resolving the latency issue
How Latency Works
Consider that you are buying a product through an online shop and you press the “Add to Cart” button for a product that you like.
The chain of events that occur when you press that button are as follow :
- Firstly, You press the “Add to Cart” button.
- Secondly, The browser identifies this as an event and initiates a request to the website’s servers. The clock for latency starts now.
- Thirdly, The request travels to the site’s server with all the relevant information.
- Then, The site’s server acknowledges the request. The first half of the latency is complete.
- The server accept the request status.
- The site’s server replies to the request with relevant information.
- The request reaches your browser and in the card the system adds the product. With this, the latency cycle is completed.
The latency is the time that it takes for all these events to complete.