

At massive scale, the data has to be sharded into manageable pieces and then distributed over a large number of servers. Imagine Facebook trying to store their petabytes of data in a single database on a single server? It would be impossible. With a sharded database your application no longer has a single point of failure and is more fault-tolerant.īig data requires sharding for the simple fact that at large scale a single machine can't hold the entire dataset. If one of those machines goes down, we still have additional machines with the data that can serve requests. Sharding allows for replication because we can copy each shard of data onto multiple servers, which makes our application more reliable. You've sharded your work so that your business can get more done than what you could do alone.ĭatabases are sharded for 2 main reasons, replication and handling large amounts of data. Eventually you get too much work to handle on your own so you hire employees for the tasks of making cookies, cakes, and brownies. In human terms, think about owning a successful bakery. This allows for applications to scale far beyond the constraints of a single traditional database. In simple terms it means you are taking your data and breaking it up into "shards", different pieces that together hold all of your data. If you prefer watching a video and would also like to learn more about scaling databases beyond just sharding, check out the video below: Database Sharding vs Datebase Partitions.In this post I'm going to cover database sharding in depth, as well as some other basic concepts related to database scaling.

Knowing this stuff is essential if you want to advance your career
DATABASE SHARDING FULL
If you want to reach your full potential as a developer you need to have at least a basic understanding of how all levels of an application work.Īt the higher levels for engineers it's more about your ability to design a system rather than pure coding ability.
