<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/why-one-database-isn-t-always-enough-batbb8k5d" -->

---
title: Why One Database Isn’t Always Enough | daily.dev
description: An overview of database sharding — splitting data across multiple databases to handle scale beyond what a single instance can manage. Covers the core concept...
canonical: https://daily.dev/posts/why-one-database-isn-t-always-enough-batbb8k5d
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Why One Database Isn’t Always Enough | daily.dev
og:description: An overview of database sharding — splitting data across multiple databases to handle scale beyond what a single instance can manage. Covers the core concept...
og:url: https://daily.dev/posts/why-one-database-isn-t-always-enough-batbb8k5d
og:image: https://api.daily.dev/og/posts/BatBb8k5d.png
og:image:alt: Why One Database Isn’t Always Enough
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Why One Database Isn’t Always Enough

**[Web Dev Cody](https://daily.dev/sources/webdevcody)** · 8 min read · 0 upvotes · 0 comments

## Summary

An overview of database sharding — splitting data across multiple databases to handle scale beyond what a single instance can manage. Covers the core concept of using a shard key and hash function to route data deterministically, the naive modulo approach and its limitations when adding new shards, and the virtual buckets pattern as a more flexible alternative. Pros include reduced latency, higher capacity, and regional colocation. Cons covered include cross-shard joins, distributed transactions, coordinating migrations across shards, backup complexity, rebalancing costs when adding or removing nodes, and hot shards caused by poor shard key selection. MongoDB and DynamoDB are highlighted as databases with built-in sharding support.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=rxR4nIQ0hCk>

## Questions this post answers

### What is a hot shard and how does it happen in DynamoDB?

A hot shard occurs when a poorly chosen partition key causes too much data or traffic to concentrate on a single shard or partition, defeating the purpose of sharding. In DynamoDB this is called a hot partition, and it happens when the partition key isn't unique or well-distributed enough, putting excessive compute strain back on one underlying node despite the database's automatic sharding.

_Anyone picking a partition key strategy can compare sharding pitfalls and fixes on daily.dev._

### How do virtual buckets solve the problem of adding new shards without massive data movement?

Virtual buckets work by hashing a key and taking the modulus against a large fixed number, then mapping ranges of that modulus space to specific shards, rather than hashing directly against the current shard count. When a new shard is added, only the range boundaries need to shift slightly, so far less data has to be relocated compared to rehashing against a small, changing shard count directly.

_Teams planning shard growth can dig deeper into rebalancing strategies through daily.dev._

### What are the main downsides of sharding a database?

Sharding adds complexity in cross-shard joins (often requiring application-level joins), distributed transactions across shards, coordinating schema migrations across every shard, backing up and restoring multiple databases instead of one, rebalancing data when shards are added or removed, and the risk of hot shards from a poorly chosen shard key concentrating data unevenly.

_Engineers weighing sharding against other scaling options can explore tradeoffs on daily.dev._

## Similar posts on daily.dev

- [An Intro to DB Sharding](https://daily.dev/posts/an-intro-to-db-sharding-gphrjfgug) · System Design Codex · 12 upvotes · 0 comments
- [Database Sharding: How It Works and When You Actually Need It](https://daily.dev/posts/database-sharding-how-it-works-and-when-you-actually-need-it-wbf2g1gif) · Last9 · 1 upvotes · 0 comments
- [Distributed Databases: An Overview](https://daily.dev/posts/distributed-databases-an-overview-pt2nq8a4o) · Couchbase · 0 upvotes · 0 comments
- [What is Sharding in MongoDB and When Should You Use It?](https://daily.dev/posts/what-is-sharding-in-mongodb-and-when-should-you-use-it--hj1rjsvau) · Foojay.io · 1 upvotes · 0 comments
- [Data Sharding vs Data Partitioning: A Complete Guide for High-Performance Databases](https://daily.dev/posts/data-sharding-vs-data-partitioning-a-complete-guide-for-high-performance-databases-yufjm8g14) · C\# Corner · 1 upvotes · 0 comments

---

Tags: [#mongodb](https://daily.dev/tags/mongodb), [#distributed-systems](https://daily.dev/tags/distributed-systems), [#aws-dynamodb](https://daily.dev/tags/aws-dynamodb)

[View this post on daily.dev](https://daily.dev/posts/why-one-database-isn-t-always-enough-batbb8k5d)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Why One Database Isn’t Always Enough","url":"https://daily.dev/posts/why-one-database-isn-t-always-enough-batbb8k5d","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/why-one-database-isn-t-always-enough-batbb8k5d"},"datePublished":"2026-07-09T17:34:32.624Z","dateModified":"2026-09-14T06:37:21.023Z","description":"An overview of database sharding — splitting data across multiple databases to handle scale beyond what a single instance can manage. Covers the core concept...","image":"https://i.ytimg.com/vi/rxR4nIQ0hCk/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/rxR4nIQ0hCk/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Web Dev Cody","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Web Dev Cody","logo":"https://media.daily.dev/image/upload/s--9ioIrvxf--/f_auto/v1723789220/logos/webdevcody","url":"https://daily.dev/sources/webdevcody"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/why-one-database-isn-t-always-enough-batbb8k5d","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"mongodb,distributed-systems,aws-dynamodb","timeRequired":"PT8M","video":{"@type":"VideoObject","name":"Why One Database Isn’t Always Enough","description":"An overview of database sharding — splitting data across multiple databases to handle scale beyond what a single instance can manage. Covers the core concept...","thumbnailUrl":"https://i.ytimg.com/vi/rxR4nIQ0hCk/sddefault.jpg","uploadDate":"2026-07-09T17:34:32.624Z","duration":"PT8M","url":"https://api.daily.dev/r/BatBb8k5d","embedUrl":"https://www.youtube.com/embed/rxR4nIQ0hCk"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Web Dev Cody","item":"https://daily.dev/sources/webdevcody"},{"@type":"ListItem","position":3,"name":"Why One Database Isn’t Always Enough"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/why-one-database-isn-t-always-enough-batbb8k5d#faq","mainEntity":[{"@type":"Question","name":"What is a hot shard and how does it happen in DynamoDB?","acceptedAnswer":{"@type":"Answer","text":"A hot shard occurs when a poorly chosen partition key causes too much data or traffic to concentrate on a single shard or partition, defeating the purpose of sharding. In DynamoDB this is called a hot partition, and it happens when the partition key isn't unique or well-distributed enough, putting excessive compute strain back on one underlying node despite the database's automatic sharding. Anyone picking a partition key strategy can compare sharding pitfalls and fixes on daily.dev."}},{"@type":"Question","name":"How do virtual buckets solve the problem of adding new shards without massive data movement?","acceptedAnswer":{"@type":"Answer","text":"Virtual buckets work by hashing a key and taking the modulus against a large fixed number, then mapping ranges of that modulus space to specific shards, rather than hashing directly against the current shard count. When a new shard is added, only the range boundaries need to shift slightly, so far less data has to be relocated compared to rehashing against a small, changing shard count directly. Teams planning shard growth can dig deeper into rebalancing strategies through daily.dev."}},{"@type":"Question","name":"What are the main downsides of sharding a database?","acceptedAnswer":{"@type":"Answer","text":"Sharding adds complexity in cross-shard joins (often requiring application-level joins), distributed transactions across shards, coordinating schema migrations across every shard, backing up and restoring multiple databases instead of one, rebalancing data when shards are added or removed, and the risk of hot shards from a poorly chosen shard key concentrating data unevenly. Engineers weighing sharding against other scaling options can explore tradeoffs on daily.dev."}}]}
```

