First Move (11~18) - Code, Learn, Build
🧭 Career CompassDashboardProgress
Loading...
First Move (11~18) - Code, Learn, Build

Structured, level-based technology learning paths from foundational exploration to industry mastery.

Learning Domains

  • Python Programming (Active)
  • Computer Science Core
  • Web Development
  • AI & Machine Learning

Platform Architecture

  • Level-Based Progression
  • Decoupled Content Schema
  • Modular Code Execution Engine
  • Curated Official Resources

© 2026 First Move (11~18) • CODE • LEARN • BUILD. Built with Next.js App Router.

Readability & Accessibility First

← System Design & Scalable Architecture|Level 2: Distributed Caching, CAP Theorem & Database Sharding

4. The CAP Theorem & Database Horizontal Sharding

Lesson 4 of 6
Saved Locally (Guest)
Progress
0%

The CAP Theorem & Database Horizontal Sharding

Analyze Consistency, Availability, Partition Tolerance (CAP Theorem) trade-offs, and scale databases horizontally using Range and Hash Sharding.

CAP Theorem & Database Sharding

### The CAP Theorem (Brewer's Theorem) In a distributed network partition (P), a system MUST choose between: - **Consistency (CP)**: Every read receives the most recent write or an error. - **Availability (AP)**: Every non-failing node returns a non-error response without guaranteeing latest data. ### Database Sharding Sharding partitions large tables horizontally across multiple distinct database instances based on a **Shard Key** (`user_id`).
💻 Ready to test your knowledge with code?
Solve the hands-on coding exercise in the interactive code editor.