<div class="shownotes"><p>Database sharding is a process of storing a large database across multiple machines. Because a single machine can only hold and process so much data, eventually some systems will scale beyond the ability of a single machine to handle data. Further, as systems scale, they may also need to split data between machines due to security and location considerations. Database sharding overcomes these problems by splitting the system into smaller chunks, allowing work to either be done in parallel, or only in the locations with the relevant data.</p><p>Obviously, it matters a lot how you split up your data. For instance, it's unlikely that splitting a customer table based on the customer last name will be as helpful in a large distributed system as it would be to split up customers by location. You probably also want to have shards that are roughly the same size. The idea behind sharding is to improve performance, specifically via parallelization, but it's also helpful if it also provides some resilience to outages. So that will also need to be a consideration when you start thinking about sharding.</p><p>Database sharding can be a very useful tool for making your application more resilient to load. However, it's complex and you really need to think through it carefully if you are considering using it in your environment. There are several different ways to do it, with different advantages and disadvantages, and these will need to be thoroughly considered before starting. Plus, sharding is actually a fairly drastic operation, requiring support and extra work for the remaining lifetime of your application. This means that you shouldn't really consider it until most other options have been exhausted.</p><div class="links"><h3>Links</h3><h3><a href="https://completedeveloperpodcast.com/?feed-stats-url=aHR0cHM6Ly93d3cucGF0cmVvbi5jb20vQ29tcGxldGVEZXZlbG9wZXJQb2RjYXN0&#038;feed-stats-url-post-id=4205" target="_blank" rel="noopener noreferrer">Join Us On Patreon</a></h3><h3><a href="https://completedeveloperpodcast.com/?feed-stats-url=aHR0cHM6Ly93d3cubGV2ZWx1cGZpbmFuY2lhbHBsYW5uaW5nLmNvbS8%2FY2Rw&#038;feed-stats-url-post-id=4205" target="_blank" rel="noopener noreferrer">Level Up Financial Planning</a></h3></p></div></div> <img src="https://completedeveloperpodcast.com/?feed-stats-post-id=4205" width="1" height="1" style="display: none;" /><p>The post <a rel="nofollow" href="https://completedeveloperpodcast.com/database-sharding/">Database Sharding</a> appeared first on <a rel="nofollow" href="https://completedeveloperpodcast.com">Complete Developer Podcast</a>.</p><br /><hr><p style='color:grey; font-size:0.75em;'> Hosted on Acast. See <a style='color:grey;' target='_blank' rel='noopener noreferrer' href='https://acast.com/privacy'>acast.com/privacy</a> for more information.</p>

Complete Developer Podcast

BJ Burns and Will Gant

Database Sharding

JUN 29, 202351 MIN
Complete Developer Podcast

Database Sharding

JUN 29, 202351 MIN

Description

<div class="shownotes"><p>Database sharding is a process of storing a large database across multiple machines. Because a single machine can only hold and process so much data, eventually some systems will scale beyond the ability of a single machine to handle data. Further, as systems scale, they may also need to split data between machines due to security and location considerations. Database sharding overcomes these problems by splitting the system into smaller chunks, allowing work to either be done in parallel, or only in the locations with the relevant data.</p><p>Obviously, it matters a lot how you split up your data. For instance, it's unlikely that splitting a customer table based on the customer last name will be as helpful in a large distributed system as it would be to split up customers by location. You probably also want to have shards that are roughly the same size. The idea behind sharding is to improve performance, specifically via parallelization, but it's also helpful if it also provides some resilience to outages. So that will also need to be a consideration when you start thinking about sharding.</p><p>Database sharding can be a very useful tool for making your application more resilient to load. However, it's complex and you really need to think through it carefully if you are considering using it in your environment. There are several different ways to do it, with different advantages and disadvantages, and these will need to be thoroughly considered before starting. Plus, sharding is actually a fairly drastic operation, requiring support and extra work for the remaining lifetime of your application. This means that you shouldn't really consider it until most other options have been exhausted.</p><div class="links"><h3>Links</h3><h3><a href="https://completedeveloperpodcast.com/?feed-stats-url=aHR0cHM6Ly93d3cucGF0cmVvbi5jb20vQ29tcGxldGVEZXZlbG9wZXJQb2RjYXN0&#038;feed-stats-url-post-id=4205" target="_blank" rel="noopener noreferrer">Join Us On Patreon</a></h3><h3><a href="https://completedeveloperpodcast.com/?feed-stats-url=aHR0cHM6Ly93d3cubGV2ZWx1cGZpbmFuY2lhbHBsYW5uaW5nLmNvbS8%2FY2Rw&#038;feed-stats-url-post-id=4205" target="_blank" rel="noopener noreferrer">Level Up Financial Planning</a></h3></p></div></div> <img src="https://completedeveloperpodcast.com/?feed-stats-post-id=4205" width="1" height="1" style="display: none;" /><p>The post <a rel="nofollow" href="https://completedeveloperpodcast.com/database-sharding/">Database Sharding</a> appeared first on <a rel="nofollow" href="https://completedeveloperpodcast.com">Complete Developer Podcast</a>.</p><br /><hr><p style='color:grey; font-size:0.75em;'> Hosted on Acast. See <a style='color:grey;' target='_blank' rel='noopener noreferrer' href='https://acast.com/privacy'>acast.com/privacy</a> for more information.</p>