This new type of distributive ledger technology – the blockchains – have shot up in popularity recently. But they’re having a problem with scaling.
Only if you understand how current and future blockchain-scalability approaches work, will you be able to know how to invest in the space. In this article I’ll provide a rundown on the current mainstream and semi-mainstream solutions.
Layer 1 or On-Chain Scalability Solutions
Layer 1 solutions are built directly into the underlying blockchain protocol itself, to optimise the core, such as increasing the block size, doing sharding (splintering the network into pieces) or changing the consensus mechanism.
For example, Ethereum is moving from proof-of-work, where transactions are confirmed by mining, to proof-of-stake, where the power to confirm transactions resides with node operators based on their recorded wealth. This also increases transaction processing capacity, but only if a majority of miners or others with the ability to destroy Ethereum (known as the ‘nuclear option’) agree to forgo their sources of income. That number is 51.3 per cent, which means that if just under half the Ethereum users correlate and reject the switch, the result will be a blockchain fork, where the old chain and its new chain continue to exist alongside each other; everyone needs to collaborate to overcome what Keynes called the ‘paradox of thrift’.
On the other hand, Layer 2 solutions function sat atop the base Layer-1 blockchain and take advantage of scalability by moving transactions off-chain to secondary protocols or mitigating the load these transactions place on the main chain. Off-chain transactions are then settled on-chain when required, reducing the load and improving performance. Examples here include payment channels, state channels, and sidechains. Some of these solutions also provide smart contract and dApp support, adding functionality and flexibility.
Layer 2 or Off-Chain Scalability Solutions
Unlike Layer 1, which changes the base protocol of the blockchain, such as Bitcoin, Layer 2 solutions operate ‘on top’ of the base network. They help to improve scalability, either by processing several transactions off-chain or by processing them through a secondary protocol, thus reducing transaction cost and improving network efficiency.
Though these upgrades can offer substantial benefits to blockchain networks, they can also cause problems – for example, if a blockchain’s consensus mechanism dependencies on some form of ‘stake’ (meaning ownership of tokens, or voting power, etc) to identify or elect the next block validator, then all of a sudden these solutions might enable a few key stakeholders to consolidate control over the blockchain.
Furthermore, some of these solutions can actually make verifications more difficult by removing them from the blockchain, or off-chain, suggesting that the true appeal of Layer-2 solutions such as payment channels and sidechains is their ability to provide a useful work-around to some of the immediate scaling issues without impeding the fundamental functionality of a cryptocurrency’s underlying blockchain infrastructure. They can also provide developers with a means to develop new applications and capabilities inherently stunted by existing scalability constraints.
Vertical Scaling
Vertical scaling is creating increased efficiency in a blockchain network via extra hardware. For example, more RAM can be added to a machine or components can be swapped out for newer parts that are capable of handling a heavier workload. But, this method creates a single point of failure if a machine goes offline due to a critical issue or hardware malfunction plus a greater investment is necessary in backup and disaster recovery planning.
Another is horizontal scaling: this is the splitting of the processing load among a greater number of machines. This type of solution increases a blockchain’s performance by reducing the workload it imposes onto the layer 1 blockchain. It can even make a blockchain more cost-effective (when compared with vertical scaling). Yet it can also be more difficult to implement and entail more downtime should a system require maintenance or upgrades – which is problematic for highly available and fault-tolerant applications.
Horizontal Scaling
Horizontal scaling, on the other hand, means adding more machines to distribute the load across them. If you have this kind of distributed system, expanding it horizontally can help you improve the system’s performance, or its availability, or both. Plus, it will let you support a larger number of users. At the same time, distributing the tasks across the machines makes the system more fault-tolerant: if a machine goes down, the others in the system can pick up its work.
Load-balancing distributes incoming requests across multiple servers, for example. Other techniques include sharding, in which data is divided into smaller pieces to be placed and crunched in parallel across different machines. This can significantly increase application performance.
However, horizontal scaling takes more time to manage and maintain, can increase software costs (eg, licensing load-balancing or distributed file systems), and bring with it complexity (eg, network overhead from intercommunication between servers, all of which can affect the performance of the system and create a security issue), and, if the original system is stateful, the transition from vertical to horizontal scaling is rather demanding as it can require copying data between machines.