Technology attributes
In the physical world, a shard is defined as a piece or fragment of a whole object, such as a broken piece of glass, ice, or pottery. In computing, a shard is a fragment or partition of a whole database.
Sharding is the process by which a database is intentionally separated into smaller pieces in order to improve the database's performance and make it more manageable to store. This is a potentially useful technique for managing large databases because storing them entirely in one place (i.e. on one server) requires high-end, costly computers. Data shards, meanwhile, can be distributed across numerous servers with lower software and hardware requirements, typically resulting in lower cost.
Multiple blockchain projects are working to implement - or have already implemented - sharding as a method of improving the blockchain's performance in terms of transaction throughput. Among these are Ethereum, Zilliqa, and IOST.
Ethereum creator Vitalik Buterin describes the problem that sharding addresses as the Scalability Trilemma, which claims that with current technology, blockchain systems can have at most two of the three following properties:
In other words, if a blockchain is to have good scalability (i.e. high transaction throughput), then it will sacrifice decentralization, security, or both.
Taking Ethereum as an example: In order to achieve security and decentralization, all Ethereum nodes store a full copy of the Ethereum ledger containing a record of every transaction that has ever been validated and added to the blockchain. The idea of sharding is to break that transaction history into pieces, and then have each node store a piece rather than the full history. For example, some nodes store the shard containing the history of all wallet addresses beginning with '0x00', while other nodes store the shard with all '0x01' wallets, and so on. Then node group '0x00' only has to communicate with node group '0x01' when a transaction occurs involving wallets from both groups. As a result, there are fewer nodes processing every single transaction, and transaction throughput increases.
Sharding is not considered a perfect solution to the Scalability Trilemma. By removing the condition that all nodes process all transactions, some decentralization and security are sacrificed. However, the design goal of sharding is to sacrifice as little decentralization and security as possible while gaining as much scalability as possible.