{
  "id": 21090681,
  "title": "How Instagram Split One Database Into Thousands",
  "url": "https://urgent.news/2026/11/21/how-instagram-split-one-database-into-thousands",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-21T18:48:12.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/thebytemechanics/how-instagram-split-one-database-into-thousands-14m"
  },
  "original_language": "en",
  "account": "As Instagram's user base surpassed 14 million in just a year, the app's data requirements grew exponentially. All information, including user details, photo specifics, and tags, resided within PostgreSQL databases. In a short period, over 25 photos and 90 likes were generated every second. While adding more database servers could alleviate the strain, Instagram needed a solution that would prevent the main server from becoming a bottleneck. The answer lay in splitting the database into numerous pieces, each self-sufficient and requiring minimal coordination. This led to the introduction of shard keys, logical shards, and a unique 64-bit photo ID that determined the shard responsible for each photo. Splitting the database by upload time or using random IDs resulted in inefficiencies, as either hot shards or scattered user data would arise. Instead, Instagram opted to group data around users, ensuring that each user's data remained on a single logical shard among thousands. This approach allowed Instagram to efficiently locate the appropriate server without searching through all available machines, resulting in a streamlined and scalable system.",
  "summary": "Shard keys, logical shards, and the 64-bit photo ID that says when a photo was made and which shard holds it Two different photos. Two different databases. Both stamped with the same ID: 3. That's what happens when you split one database into many pieces and every piece counts on its own. Instagram had to split its data early, so it had to solve exactly this. Its answer was hidden inside the…",
  "key_points": [
    "Instagram's user base grew to 14 million in a year.",
    "Database split into thousands for efficient data management.",
    "Shard keys and 64-bit photo ID determined data distribution."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}