API Latency vs Response time

Since long i have been asked to show API performance numbers and how is my team working on tasks to improve API response time. I went through few case studies and examples. I think i should share the overview what i found so far about API response time.

Response time — Response time is the amount of time a system takes to react to a request once it has received one. For example, the time between the instant we execute an API and this API returns the result of its computation, that’s the response time.

Latency — In simplest terms this is Remote Response time. For instance, you want to invoke a web service or access a web page. Apart from the processing time that is needed on the server to process your request, there is a delay involved for your request to reach to server. While referring to Latency, it’s that delay we are talking about. This becomes a big issue for a remote data center which is hosting your service/page. Imagine your data center in US, and accessing it from India. If ignored, latency can trigger your SLA’s. Though it’s quite difficult to improve latency it’s important to measure it. How we measure Latency? There are some network simulation tools out there that can help you