VOOZH about

URL: https://www.digitalocean.com/community/tutorials/understanding-database-sharding?comment=77414

โ‡ฑ Understanding Database Sharding | DigitalOcean


Understanding Database Sharding

Updated on March 17, 2022

By Mark Drake

Manager, Developer Education

๐Ÿ‘ Understanding Database Sharding

Introduction

Any application or website that sees significant growth will eventually need to scale in order to accommodate increases in traffic. For data-driven applications and websites, itโ€™s critical that scaling is done in a way that ensures the security and integrity of their data. It can be difficult to predict how popular a website or application will become or how long it will maintain that popularity, which is why some organizations choose a database architecture that allows them to scale their databases dynamically.

In this conceptual article, we will discuss one such database architecture: sharded databases. Sharding has been receiving lots of attention in recent years, but many donโ€™t have a clear understanding of what it is or the scenarios in which it might make sense to shard a database. We will go over what sharding is, some of its main benefits and drawbacks, and also a few common sharding methods.

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the author

๐Ÿ‘ Mark Drake
Mark Drake
Author
Manager, Developer Education
See author profile

Former Technical Writer at DigitalOcean. Focused on SysAdmin topics including Debian 11, Ubuntu 22.04, Ubuntu 20.04, Databases, SQL and PostgreSQL.

Still looking for an answer?

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Great article, thank you!

When it comes to building multi tenant applications there are generally 3 db options:

  1. Shared database with shared schema
  2. Shared database with isolated schema
  3. Isolated databases

If I were to go with a shared db and an isolated schema, would I be able to shard based on the schema alone?

If so is this something I can do with DOโ€™s managed database service, is sharding even a feature of DOโ€™s managed dbs (given that postgres technically does not support it)?

Hi.

I want to implement Range Based Sharding based on a multistore app. So, each horizontal partition correspond to one merchant.

What tutorial do you recommend to implement it on MySQL?

Best regards

Good knowledgeโ€ฆThank You

Nice article. Thanks for sharing it.

Does the sharding (horizontal partitioning) still work if the original database is columnar?

๐Ÿ‘ Creative Commons
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
  • Deploy on DigitalOcean

    Click below to sign up for DigitalOcean's virtual machines, Databases, and AIML products.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and AI-native businesses

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOceanโ€™s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow โ€” whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

ยฉ 2026 DigitalOcean, LLC.Sitemap.
Dark mode is coming soon.