This topic describes how to split, merge, and delete shards in the Log Service console.
Background information
- You can write data to a shard at a maximum rate of 5 MB/s and read data from a shard
at a maximum rate of 10 MB/s. If your data traffic exceeds the service capacity of
a shard, we recommend that you split the shard.
You can split a shard of a Logstore on the Logstore Attributes page of the Logstore.
- If the data traffic is much less than the maximum read/write capability of shards, we recommend that you merge shards.
Split a shard
Enable automatic sharding
- The data traffic exceeds the write capacity of the existing shards for more than 5 minutes.
- The number of shards in the readwrite state does not exceed the specified maximum number of shards in the Logstore.
- Automatic sharding
If the amount of data written to the Logstore exceeds the write capability of the existing shards for more than 5 minutes, the number of shards is increased to accommodate the data traffic.
- Maximum shards
The maximum number that shards in the Logstore can be automatically split into is 64.
Merge shards
You can merge shards of a Logstore. When you specify a shard for merging, Log Service locates the shard next to the specified shard, and merges the two shards.
- The specified shard that you specify for merging must be in the readwrite state. In addition, the shard must not be the last shard that is in the readwrite state.
- After the shards are merged, their status changes to the readonly state. The new shard is in the readwrite state. The MD5 value ranges of the two shards cover the MD5 value range of the new shard.
Delete a shard
- Automatic deletion
You can specify a data retention period when you create a Logstore. If you specify the retention period, shards in the Logstore and data stored in the shards are automatically deleted when the retention period expires.
- Manual deletion
You can turn on the permanent retention switch when you create a Logstore. This allows you to delete the shards and data from the Logstore by deleting the Logstore. For more information, see Delete a Logstore.