Partitioning

Alternative Terms:

Benefits of Partitioning…

Types of Partitioning

Horizontal Partitioning (Sharding)

Partition Strategies

Rebalancing Partitions

Request Routing

How do you know where to send the request? Three options…

  1. Ask the node --> C: Where is Foo? N0: on N1
  2. Add a routing layer / third party --> C: Where is foo? R: Found on N1
  3. Client knows where to find --> Saved internally
Zookeeper

Zookeeper is an example of a routing tier option. It holds the knowledge of what data is stored on which node

Vertical Partitioning

e.g. One table holds description and the other the current stock. Advantage is that the current stock is likely to change more frequently, whilst the description is read only.

Functional Partitioning

Approach for Partitioning

Partitioning for Scalability

Partitioning for Improved Query Performance

Query performance boostable using smaller data sets and running parallel queries

Partitioning for Improved Availability

Avoid single points of failure


Additional Content

  • Scalability
  • Less contention
  • Improve performance
  • Optimize storage costs
  • Improve Security

If a partition is unfair, that is, one part has more data or queries.

Disproportionally high load

  • horizontal
  • vertical
  • functional

  • key range
  • hash-based