Latency in System Design

Latency is defined as the amount of time required for a single data to be delivered successfully. Latency is measured in milliseconds (ms).

Latency

We all have encountered situations where websites and web applications take longer to respond, or there is buffering while playing a video despite having good network connectivity. Then the latency for such systems is said to be comparatively high.

There is a certain amount of time required for user input over the website and there is a certain amount of time for the response from the web application to the user. So the delay between user input and web application response to the same input is known as latency

Reasons for high Latency

Now you must be wondering about the factors that are responsible for delays. So high latency mainly depends on 2 factors:

  1. Network Delays 
  2. Mathematical Calculation Process Delays 

Network Latency

In monolithic architecture, as we know there is only a single block and all network calls are local within hence network delay is zero and hence latency equals computational delays only (which if not latency equals zero in monolithic systems)

Latency = Mathematic Calculation Delays

In distributed systems, there is a networks over which signals are passed to and fro hence there will for sure be network delay.

Latency = Mathematic Calculation Delays + Network Delays 

Let us finally discuss are components affecting latency:

Components Affecting Latency:

  1. Packet Size: Smaller the packet chunk size faster the transmission and the lower the latency.  
  2. Packet Loss: Transmission of huge packets of various sizes in medium losses to very few losses in packets.  
  3. Medium of transmission: Optical fiber is the fastest way of transmission. 
  4. Distance between Nodes: Poor signal will increase latency and great connectivity decreases to a greater extent.
  5. Signal strength: Good signal strength reduces latency.
  6. Storage delays: Stored information in a database and fetching from it requires very little time which supports increasing latency.

Causes of high network Latency

How to Reduce latency:

  1. Use a content delivery network (CDN): CDNs help to cut down on latency. In order to shorten the distance between users and reduce the amount of time that data must travel over great distances, CDN servers are situated at various locations.
  2. Upgrading computer hardware/software: Improving or fine-tuning mechanical, software, or hardware components can help cut down on computational lag, which in turn helps cut down on latency.
  3. Cache: A cache is a high-speed data storage layer used in computers that temporarily store large amounts of transient data. By caching this data, subsequent requests for it can be fulfilled more quickly than if the data were requested directly from its original storage location. This lessens latency as well.

Applications of Latency

  1. Vehicles
  2. Capital Market

Important Key Concepts and Terminologies – Learn System Design

System Design is the core concept behind the design of any distributed systems. System Design is defined as a process of creating an architecture for different components, interfaces, and modules of the system and providing corresponding data helpful in implementing such elements in systems.

In this article, we’ll cover the standard terms and key concepts of system design and performance, such as:

  • Latency, 
  • Throughput, 
  • Availability,
  • Redundancy,
  • Time
  • CAP Theorem
  • Lamport’s Logical Clock Theorem.

Important Key Concepts and Terminologies In System Design – Learn System Design

Let us see them one by one.

Similar Reads

Throughput in System Design

Throughput is defined as the measure of amount of data transmitted successfully in a system, in a certain amount of time. In simple terms, throughput is considered as how much data is transmitted successfully over a period of time....

Latency in System Design

Latency is defined as the amount of time required for a single data to be delivered successfully. Latency is measured in milliseconds (ms)....

Availability in System Design

Availability is the percentage of time the system is up and working for the needs....

Redundancy in System Design

Redundancy is defined as a concept where certain entities are duplicated with aim to scale up the system and reduce over all down-time....

Consistency in System Design

Consistency is referred to as data uniformity in systems....

Time in System Design

Time is a measure of sequences of events happening which is measured here in seconds in its SI unit.  It is measured using a clock which is of two types: Physical Clock: responsible for the time between systems.   Logical Clock: responsible for the time within a system....

CAP Theorem In System Design

Three desirable characteristics of distributed systems with replicated data are referred to as CAP: partition tolerance, availability, and consistency (among replicated copies) (in the face of the nodes in the system being partitioned by a network fault). According to this theorem, in a distributed system with data replication, it is not possible to ensure all three of the required properties—consistency, availability, and partition tolerance—at the same time. It claims that only two of the three properties stated below can be supported strongly by networked shared-data systems:...

Lamport’s Logical Clock Theorem

Lamport’s Logical Clock is a process to ascertain the sequence in which events take place. It acts as the foundation for the more complex Vector Clock Algorithm. A logical clock is required because a distributed operating system (Lamport) lacks a global clock....

Contact Us