Monday, 4 December 2023

Latency vs Response time

Latency and Response Time are two different ways to measure how well a system works.

Latency

Latency is the time it takes for information to travel from one place to another. We usually measure it in milliseconds.

 

It mostly deals with how fast data moves through networks and communication systems. If we want to make it faster, we often need to make changes to the network or the way we communicate. If there's a high latency, it could mean there are problems with the network.

 

Response Time

Response time is the total time it takes to finish a task. This includes both  processing time  and any waiting time (latency). We measure it in milliseconds or seconds.

 

Making response time better means looking at the whole system, especially when we have many small parts (microservices) working together.

 

So, when we want to make a system work better, we might need to look at latency for speed in data movement and response time for overall task completion.

 

 


As you see above diagram.

Latency = request travel time + response travel time

             = 1 + 5

             = 6

 

Response time = Latency + Processing time

                      = 6 + 2

                      = 8

 

 

In summary, Low latency and fast response times are crucial for handling increased user load and ensuring smooth microservice interactions.

                                                             System Design Questions

No comments:

Post a Comment