Explore the Future of Web3: Shardeum's Whitepaper Released!

Understanding Latency and Throughput in Embedded, Computer, and Blockchain Networks

Understanding Latency and Throughput in Embedded, Computer, and Blockchain Networks

Understand the critical roles of latency and throughput in embedded, computer and blockchain networks. Learn how they impact network...

Back to top

Introduction

Latency and throughput are two terms frequently found in discussions of computers, distributed, and embedded systems. The time taken to process and transmit data from one point to another is reflected in the use of these terms when describing the speed of a system.

This blog will investigate the meaning of latency and throughput and how they affect the rate at which data is transferred and processed within the context of blockchain, computer, and embedded systems (considering we use both computer and embedded systems in our day-to-day lives and hence it will be easier for you to understand how latency and throughput impacts a linearly scalable blockchain like Shardeum)

What is Latency?

Latency in Computer/Embedded Systems

Whenever there is a lag in an instruction or signal, we say that there is latency. There may be a lag in either the transmission or processing of data. One form of latency is disk latency, and another is network delay. Latency in a network is the amount of time it takes for data to travel from its origin to its final destination. 

To illustrate network delay, let’s say a computer in one network establishes a connection with a computer in another network located far away. There will be a delay in setting up the connection due to the numerous nodes in between the origin and the final destination.

The other kind of delay is disk latency. This is the amount of time that passes between when data is requested from a storage device and the data begins to be received. Additionally, seek time and rotational latency are two aspects related to disk delay. Solid-state drives (SSDs) don’t rotate like regular hard drives (HDD). Because of this, SSDs have less latency.

Latency in Blockchain

Latency is fundamentally common for embedded, computer, and distributed systems with minor iterations. Latency in a blockchain typically means the total turnaround time between submitting a valid transaction to the network and the time network has committed to/confirmed the transaction. On Shardeum for instance, both the latency and finality time will just a few seconds as a result of its linear scalability through transaction level consensus and dynamic state sharding.

What is Throughput?

Throughput in Computer/Embedded Systems

Data throughput measures how quickly information can move from one point to another. It’s useful for monitoring the speed of RAM, hard drives, and even network connections. 

System throughput, also known as aggregate throughput, is the total data rate that is transmitted to all network terminals simultaneously. The actual data transfer speed, however, may be less than the theoretical maximum due to factors including connection speed and network traffic.

Network throughput, especially in the context of communication networks, is the proportion of attempted messages that are successfully delivered.

Communication network throughput is often measured in bits per second (bit/s or bps) and data packets per second (pps) or data packets per time slot. Moreover, the throughput of a communication system is affected by the analog physical medium (say your data provider), the available computing power of the system components (your PC/laptop), and the actions of the end users.

Throughput in Blockchain

Throughput fundamentals and limitations are also common for embedded, computer, and distributed systems/blockchains with few nuances which we will take a look at here. Throughput in blockchains typically means transactions per second (TPS) processed by a blockchain network. Transactions, here, refer to those submitted by end users. Throughput ideally should not include failed transactions or internal operational transactions processed by the network. Unlike Web2 platforms, public blockchain platforms secure their network by adding a couple of resource-intensive protocols – consensus mechanism and block size/rate limit and hence TPS of blockchain networks vary depending on how they use these protocols.

For instance, networks that use proof-of-stake consensus would be much faster than networks that used proof-of-work since the node’s processing power is not being used up by proof-of-work computation. Ideally, the rate at which the network processes transactions should be proportional to the number of nodes in the network. But that barely happens in a blockchain network due to network congestion, and vertical scaling as opposed to horizontal or linear scaling. As a result, most blockchain networks in reality process between 5 and 400 TPS at the maximum while the web2 peers like Mastercard and Paypal process up to 5000 TPS! Shardeum, which scales linearly, is aiming to achieve 1 million TPS or more.

What Affects Throughput and Latency? 

The throughput and latency of a network are its two key performance indicators. Both throughput and latency can be affected by a number of external variables.

In Computer/Embedded Systems

  • Bandwidth: A network’s bandwidth determines how much information can be sent and received at once. The throughput, or the amount of data transferred, improves when bandwidth is increased.
Latency-Throughput-Bandwidth network
Source | Latency-Throughput-Bandwidth network
  • Network congestion: Network congestion occurs when there is more data being transmitted than the network can handle, which results in packet loss and increased latency.
  • Distance: Latency can be affected by the number of network devices, such as switches and routers, the data must pass through as it travels from one end of the network to the other.
  • Network topology: Both throughput and latency may be affected by the network’s topology. Since data in a star topology traverse fewer nodes, it may have lower latency than in a mesh architecture.
  • Network protocol: Throughput and latency can be impacted by the overhead incurred by a network’s protocols. TCP, for instance, can cause extra latency since it has more overhead than UDP.
  • Network hardware: Both throughput and latency can be affected by the caliber and capabilities of components making up a network.
  • Network traffic: Both throughput and latency can be impacted by the nature of network traffic. While low latency is essential for real-time traffic like video conferencing and voice over IP, throughput may be more of a concern during file transfers.

In Blockchain

  • Self-imposed scaling limits: Public blockchains typically set maximum block sizes and production rates to ensure platform security, limiting transaction processing rates. Increasing block size limits would require more processing power, leading to centralization as it becomes too expensive for average people to run nodes which flies against the principle of Web3.
  • Consensus mechanism: The most important factor to secure a public chain is through consensus mechanisms they employ. Although lightweight consensus algorithms like proof of stake are widely used today compared to more resource and compute-intensive proof of work, this still is an additional process blockchain networks have to go through to ensure transactions are verified and added to the network accurately to prevent data manipulation and corruption. Consensus protocols inherently add to latency here and slow down the network
  • TPS directly proportional to slowest performing node: In networks like Bitcoin, where every node must process every transaction, the bottleneck is the processing power of the slowest full nodes. If the bitcoin network were to increase the self-imposed block size limit, it would run into a more natural bottleneck of processing power i.e. scaling vertically. This is another factor that affects TPS and latency of the vast majority of blockchain networks today.
  • Bandwidth: A vertically scalable network or a network that performs block level consensus will require a high amount of bandwidth to distribute and process transactions. This is another reason why the slowest performing node factor comes into play to negatively impact throughput and latency of a network.
  • Network congestion: On blockchains, network congestion happens when there are more transactions sent to the network than what it can handle. And blockchains are increasingly vulnerable to it because of the aforementioned points like vertical scaling, block level consensus, self imposed scaling limits. This is another key factor why latency is high in many blockchains today (latency often goes up to a few mins when it should be within a few seconds) and throughput does not go beyond 400 TPS. This inevitably leads to the industry’s infamous issues of rising transaction costs and front running.
  • Network topology: Unless a blockchain network scales linearly, say like Shardeum, adding more nodes may result in inefficiency and lower throughput with bad user experience.

Throughput & Latency in a Nutshell

High throughput indicates better performance, as more data can be transmitted in a shorter amount of time or more transactions processed per second in the case of a blockchain. Low latency indicates better performance, as data can be transmitted more quickly or in the case of blockchain, the time taken to validate and confirm a transaction on the network is quick.

Throughput is considered important for applications that require high data transfer rates, such as video streaming, file transfers, online gaming, and blockchain dapps. Latency is important for applications that require real-time communication, such as video conferencing, online gaming, voice over IP (VoIP) calls and blockchain dapps.

The performance of a network, or computer system relies heavily on latency and throughput. They can both speed up or slow down a system in their own unique ways as we saw in the above paras. They are also very crucial for distributed ledgers like blockchains which are now put to use 24x7x365 by products and services rendered in a peer-to-peer model by dapps/Web3 projects while removing intermediaries.


Edits: Latency/Finality time is updated for clarity and accuracy on 16th Sept 2023.

Popular Searches

Best Blockchain Bridge | Pros and Cons of Blockchain Technology | Blockchain Features and Benefits | Blockchain Scalability | What is a Governance Token | Benefits of Blockchain | Physical Layer in OSI Model | What is Proof of Stake in Sharding | Cryptocurrency Faucet | Blockchain Vs Quantum Computing | What is a Cross-Chain Bridge | How to Connect EVM Network to Metamask | What is Consortium Blockchain | Decentralized Identifiers | EVM Wallet Types | What are Blockchain Layers | Advantages and Disadvantages of Decentralization | Best Crypto Faucets | Best Blockchain Explorers | Best Crypto Exchanges | Defi Hacks | Difference Between Cryptocurrency and Blockchain | Layer 1 Blockchain | Best Crypto Youtube Channels | NFT Tracking Tools

The Shard

Sign up for The Shard community newsletter

Stay updated on major developments about Shardeum.

  • Share