Member-only story

What you should know about Database sharding

Bending the Clean Architecture Principles

Anthony Trad
2 min readDec 7, 2022
Sharding Meme

What is Database Sharding?

Database sharding is a technique used to distribute a large, scalable database across multiple smaller databases, or shards. This allows the database to handle a higher volume of data and a higher number of concurrent users, while still maintaining good performance and high availability.

Types of Database Sharding

Database sharding involves dividing the data in the database into smaller, independent units, called shards. Each shard is stored on a separate database server, and can be accessed and updated independently of the other shards. This allows the database to distribute the workload across multiple servers, which can improve performance and scalability.

There are two main types of database sharding:

  • Horizontal sharding: In this approach, the data is divided into shards based on the values of a specific column, such as the user’s ID or location. This allows the database to distribute the data evenly across the shards, and allows users to access their own data on a specific shard.
  • Vertical sharding: In this approach, the data is divided into shards based on the type of data, such as…

--

--

Anthony Trad
Anthony Trad

Written by Anthony Trad

Senior Software Engineer focused on .NET and the Cloud. Reconsidering major principles and patterns, ideas are my own.

No responses yet