Partitions
A table partition is simply a collection of entities that has the same PartitionKey. Large tables are usually distributed on storage nodes, that is, partition servers, a partition server; can contain one or more partitions. A single partition will never be split across different nodes. If a node is under a heavy load, the service will automatically split the hot partitions to a different node. This is all managed by the service, which can then merge back the partition ranges in case the traffic subsides.
Let us take the example of the weather history database discussed in the previous chapter. In this example, we designed the table to have the city ID
as the PartitionKey, which defines the partition server:
PartitionKey (city ID) |
RowKey (date and time) |
… |
Partition server (storage node) |
---|---|---|---|
… |
… |
A | |
276781 |
201503151300 |
A | |
276781 |
201503151400 |
A | |
276781 |
201503151500 |
A | |
… |
… |
A | |
… |
… |
A | |
5809844 |
201503151300 |
B | |
5809844 |
201503151400 |
B | |
… |
… |
B | |
6173331 |
201503151300... |