Please enable JavaScript.
Coggle requires JavaScript to display documents.
Partitioning (Rebalancing Strategies (Partitioning proportional to Nodes…
Partitioning
Rebalancing Strategies
Dynamic Partitioning
The db creates partitions. When data grows, partitions added, when shrinks, partitions are removed
-
-
-
Request Routing
Send all client requests to a routing tier - determine node, forward request
-
Allow clients to access any node (round-robin load balancer). If that node owns partition, handle request, if not, forwards request to appropriate node, receives reply and returns it
-
Approaches
Key range partitioning
-
-
Can result in hotspots if all keys are within a certain range. To avoid hotspots, use a key to partition values and then separate range queries within that key
-
Hybrid approach
- use compound primary key where only first part of the key is hashed to determine position and other columns are used as concatenated index for sorting data
Reasons
Scalability - a large dataset can be distributed across many disks,and the query load can be distributed across many processor
Partitioning is usually combined with replication. Node may store than one partition and the partition may be stored on more than one node. This is for redundancy
Secondary Indexes
-
Term Partitioned Indexes
Global Indexes - Covers data in all partitions. However, index cannot be stored only one node. It has to be partitioned.
The term can be used for index, if not a hash can be used. Reads are more efficient since multiple nodes need not be consulted but writes get more complicated