Latency comes up a lot in the digital world from communications to internet-powered devices. Learn what latency it is and why it’s important.

What is latency?

In the digital world, latency does not describe a skill or desire that has not yet been actualized nor does it describe an inactive pathogen. Instead, it refers to the time it takes for data to transfer. To get more specific, let’s look at the different types of latency.

Network latency

Network latency is the delay in your action and the Internet’s response to your action. For example, if you click a web page and it takes a while to load, the time it takes to load is the latency (also known as lag).

To get a bit more technical, network latency can be described as the time it takes for a data packet to travel roundtrip from the sender to the receiver then back to the sender. This is also called round trip time (RTT). The time is often completed in milliseconds, but those milliseconds can add up to create a seemingly slow experience for the end-user.

(What’s a datapacket? Glad you asked. When data is transmitted, it’s broken down into packets of similar data types to make it easier to send. The data is then put back together once all of the data has arrived at the destination.)

Latency and IoT

In the context of the Internet of Things (IoT), network latency impacts the performance of internet-connected devices, dependent on the use case. For example, latency could refer to the time it takes for one device to make a request and for a second device to respond. Take a smart lock on your home: you’ll use your phone (first device) to make a request to the lock (second device) to open your door. If there is a long lag between requests, it can have negative consequences like not being able to get into your home or taking too long to lock your home.

Latency and VoIP

With Voice over Internet Protocol (VoIP), latency has an extra layer of delay due to speed of sound and the time it takes for your voice to reach your phone or computer. Once the sound reaches your phone/computer, it is affected by network latency—the voice packet is transmitted, processed by the receiving server, and then sent to its destination. Anything under 150 milliseconds is considered good quality because the receiver won’t notice the lapse in time. Once you hit 300 milliseconds in latency, you’ll notice a lag in speech and audio quality.

Fun fact: The speed of sound (343 meters per second) is so much slower than VoIP. If you screamed in San Francisco and the sound managed to carry hundreds of miles, it would take almost 30 minutes for someone in Los Angeles to hear you.

#developer #iot #programming

Understanding Latency
1.65 GEEK