Smarty

What Is API Latency and How to Measure It

Van with a rocket

Network Latency is simply referring to the delay in communication across different networks. The higher the latency, the longer the delay. Eliminating latency is ultimately impossible.

However, it can and should be reduced in order to improve user experience, and Smarty is ludicrously efficient when it comes to moving your data. We like to boast of our capability to find and provide whatever speed you could ever possibly need or want.

While eradicating latency is challenging, minimizing it remains pivotal for an enhanced user experience. This guide delves into latency forms, measurement, causes, reduction strategies, and the availability of low-latency, high-speed solutions.

This empowers you to take charge of your digital interactions and revolutionize your online journey, leaving lag behind and embracing a world where data flows effortlessly.

Feel free to check out our API tool:

US Street Address API International Street Address API US Rooftop Geocoding

Here is a quick look at some of the information we'll be covering:

What is Network Latency?

Latency is about the time it takes for the data to get from Point A to Point B.

Sometimes, people can confuse the idea of latency (the time it takes for information to be sent from one spot to the next) and throughput (the amount of information going from Point A to Point B.)

There are many different types of latency: disk latency, fiber optic latency, and operational latency. Understanding these differences will help to clarify true latency.

  • Disk latency is the slowest form of information latency, and it sounds like what it entails, the speed the data travels while using a disk. You may be old enough to remember floppy disks like Superfrog.
  • You'd insert the disk, then literally listen to the latency (the gears turning, the fan going into hyperdrive) as the file is being read by the CPU and booted up to your screen. The file cannot all be read at once; rather it spins on platters to read new instructions a little at a time.

  • Fiber optic latency is the time it takes when transmitting a light signal over a length of optical fiber. This can be altered depending upon several factors; brand of the fiber, the wavelength of the transmitted signal, and even the temperature, but the one that is most relevant to understanding latency in this regard is the length of the fiber itself.
  • Operational latency can be defined as the time it takes for the entire data package to be sent as a whole, from start to finish.

How is Latency Measured?

Internet distance graphic

Latency is measured typically by a company's monitoring tools. They calculate the time, down to the millisecond, that it takes for the data to travel from one point to the next. It's pretty incredible really, but what many of these tools fail to recognize are several measuring factors such as missed sends, or delays in sends.

This phenomenon is called coordinated omission, a term coined by Gil Tene, and it's something that many of our competitors do not analyze when calculating their true latency times. They tend to ignore the long-tails, essentially touting a better latency than they actually have.

Let's put this into layman's terms. You go online to order a new playstation model (the PS5). The time it takes for the PS5 to get to your house is set for 5 days. The time it will take for the package to deliver from the store to your home is the latency.

However, the store you order from had a mixup and is currently out of stock. Your order is now placed on backorder. Once the facility receives more PS5s, they can ship it out to your home. Of course it will still take them 5 days to deliver it to your door from that point.

In the meantime, you can't enjoy playing your new games, and you are socially ostracized from the group for not going live with them. You are unable to level up your characters, and even when the PS5 does arrive, you will always be a level behind your friends when you are able to join them because they got a head start.

The company might still claim that their latency time period is 5 days, but they aren't taking into account the other mitigating factors that influence latency.

How does Smarty Measure our API Latency?

Here at Smarty, we know that providing average latency is worthless; the only truly accurate way to measure latency is through using percentiles. Using percentiles captures and represents those outlier situations where you may be waiting on that data to send, or the PS5 to arrive.

Doing this guarantees that those outlier situations are not amortized, or masked, among the averages. We're not participating in coordinated omission when we tell you that our latency is ludicrously low.

This ludicrously low latency speed is measured from when Smarty receives the request, processes the request and hands that request off to be sent back to you. This gives you confidence knowing that we won't be twiddling our thumbs once we have it.

Our Service Level Agreement states:

  • US Street [Address] API: 99.98% of requests containing a single lookup will respond within 500ms (over a five-minute period).
  • US [Address] Autocomplete Pro API: 99.00% of requests containing a single lookup will respond within 100ms (over a five-minute period).
  • US ZIP Code API: 99.90% of requests containing a single lookup will respond within 250ms (over a five-minute period).
  • US Extract API: 99.00% of requests will respond within 2000ms (over a five-minute period).
  • US Reverse Geocoding API: 99.99% of requests containing a single lookup will respond within 200ms (over a five-minute period).
  • International Street Address API: 99.90% of requests containing a single lookup will respond within 1000ms (over a one-month period).
  • International Address Autocomplete API: 99.00% of requests containing a single lookup will respond within 1000ms (over a five-minute period).
  • 500 milliseconds is fast, and on average we are closer to sub-30 millisecond speeds. These numbers may be a little abstract so think of it like this. A human eyeblink can be measured around 300-400 milliseconds. A blink is fast. Smarty is fast…. And is usually way faster. Like getting close to the speed of human thought which has been measured at around 13 milliseconds.

    In layman's terms (over a five-minute period), if you submitted 10,000 single address lookups to Smarty's US Street API, Smarty guarantees that only 2 of them will be over the 500 millisecond threshold, the other 9,998 lookups will start their return journey in less than 500 milliseconds.

    The millisecond we receive the information, it’s being processed and sent on it's way.

    What Causes Internet Latency?

    Data virtualization graphic

    Distance is one of the main causes of latency. In order to understand how distance affects latency, let's take a look at the Mars rover and how it impacts the rover's communications. In order to communicate with their robot, NASA has to send instructions or a data packet from its servers to the rover.

    Imagine that it takes 6 minutes round-trip for the information to be sent to Mars and back. That 6 minutes is the latency caused by the time it takes to have that information travel that distance. The only way to reduce the time, would be to reduce the distance.

    If we were to shorten the distance, and the rover was on our moon instead, it may only take 3 minutes round-trip. The shorter the distance, the better the latency.

    Network speed is a latency problem that is directly associated with the sender's or recipient's hardware. What is the internet package that was purchased? Are there caps on speed based on that? Is the router being used older than 20 years, or is it fresh out of the box (like the new PS5 you might be waiting on)?

    These are questions to consider when trying to narrow the cause of your internet latency down. Remember that a faster network communication is a two-way street; even if your gear is top-notch, if the receiving party's hardware was built in 1985, you will still experience a slower network speed and longer latency timeframes.

    Performing an internet speed test may help to see if the network speeds are consistent enough for low latency levels.

    File size also plays a large role in latency issues. Have you ever noticed that it takes 4 times as long to send a funny video of your toddler covering the baby in peanut butter to your mom as it does to send a text about the incident?

    The difference in response times is due to file size. The bandwidth on your phone can only send so much data at once. Just like it would take you longer to move two kids to the bathtub at the same time, the file size of a video in comparison to a text will take longer because it is a bigger load to carry.

    How can latency be reduced on your end?

    • Ethernet Cables: Connecting your devices to the router with a cable will give the information a more direct route to travel than using Wifi.

    • Router Positioning: The best place for your router is typically at the center of the home. Eliminate anything that would be obstructing the router's signal.

    • Mitigating Background Websites and Programs: Make sure that the bandwidth is being allotted to the most important task by closing down those funny cat videos in the background.

    • Ensure that your outside software is fast and reliable: It's time to stop using Granny's old equipment and get your own router.

    Benefits of Low Latency Combined with Smarty's ludicrous speed

    Rabbit speeding by

    While other top providers cap you anywhere from 60-160 queries per second, here at Smarty, we have customers routinely running 10,000 addresses per second. That's basically lighting fast! And our speed is reliable; we promise a 99.98% uptime. We can go as fast as you could ever need or want.

    When Smarty was first created, we had one goal in mind: Let's make a product that's great AND fast. We did just that. Rather than moving the Mars rover 2 feet to the left, then waiting 6 minutes to send another request, using Smarty empowers you to batch your requests.

    You could tell that robot how to perform a cha-cha, and it would still only take the 6-minute latency.

    We are also highly aware of the latency issue associated with distance, so we decided that Smarty needed multiple locations, one in the Midwest, one on the East Coast, and one in the West Coast.

    Additionally, and hang onto your socks here, because this is really cool, we utilize HTTP Keep Alive. Once a request is sent, Smarty keeps that connection alive for a time in order to help increase our already blazing speeds. (Did you hang onto your socks?)

    Latency is a huge issue for high-traffic internet users, small business owners, and larger corporations alike. It can diminish client experience, workplace efficiency, and your chance to become the next paid-to-play member of the PS5 community.

    BUT, NETWORK LATENCY ISSUES DON'T HAVE TO BE AN ISSUE! Sign up for a free trial of our ludicrous speed. Contact our Smarty sales personnel today to discuss how you can become just as fast as we are. We might even be able to help you put your socks back on.

    Ready to get started?