Course contentsShow
← System Design
Lesson 1476 of 1,91936. Data Partitioning Strategies in DepthFree lesson

Directory Partitioning Fundamentals

Using a lookup table to map partition keys to physical partition locations.

Directory Partitioning Fundamentals

You'll learn: How a lookup table can map partition keys to their physical storage locations in a distributed system.

What Is Directory Partitioning?

Instead of using a mathematical function (like hash or range calculations) to determine where data lives, directory partitioning maintains an explicit lookup table—a "directory"—that records which partition key belongs to which physical node or partition.

Think of it like a phone directory: rather than calculating which office handles your zip code, you simply look it up in a master list that says "90210 → Server A" and "10001 → Server B."

How It Works

The directory is typically a separate service or data structure that stores mappings:

Partition Key → Physical Location
"users_A-F"   → Node 1
"users_G-M"   → Node 2
"users_N-Z"   → Node 3

When a request arrives for a specific key, the system:

  1. Queries the directory with the partition key
  2. Receives the physical location (node ID, server address, etc.)
  3. Routes the request to that location

Key Advantages

  • Maximum flexibility: You can assign partitions arbitrarily based on access patterns, data size, or node capacity
  • Easy rebalancing: Just update the directory entries—no mathematical recalculation needed
  • Heterogeneous partitioning: Mix hash-based and range-based assignments freely

The Tradeoff

The directory itself becomes a critical dependency. It must be highly available, consistent, and fast. If the directory fails or becomes a bottleneck, the entire system can't route requests.

Key Takeaway: Directory partitioning uses an explicit lookup table to map partition keys to physical locations, trading mathematical determinism for maximum routing flexibility—but introducing a critical metadata service dependency.