tencent cloud

TDSQL for MySQL

DocumentationTDSQL for MySQLPractical TutorialSelection of TDSQL Instance and Shard Configuration

Selection of TDSQL Instance and Shard Configuration

Download
Focus Mode
Font Size
Last updated: 2026-11-11 11:10:25
AI-Translated

TDSQL Selection Overview

A TDSQL instance is composed of shards. The specification and number of shards determine the processing capability of the instance. In theory:
TDSQL instance read and write concurrence performance = ∑ (performance of a shard with a certain specification * number of shards)
TDSQL instance transaction performance = ∑ (transaction performance of a shard with a certain specification * 70% * number of shards)
Therefore, the higher the shard specification and quantity, the stronger the processing capability of the instance. The performance of a shard is mainly subject to CPU/memory and measured by QPS. General performance metrics are detailed in the shard performance description section.

TDSQL Shard Specification Selection

Specification of a TDSQL shard is determined by three factors: performance, capacity, and other requirements.
Performance: by predicting the performance demand and possible growth for at least six months, you can define the total CPU/memory size required of your TDSQL instance. Capacity: by predicting the disk capacity and possible growth for at least one year, you can define the total disk size required of your TDSQL instance. Other requirements: you are recommended to store at least 50 million rows of data in one shard and take into account business needs such as broadcast and non-sharded tables and in-node joins.
Note:
You are recommended to ensure high specification for a single shard while keeping the shard quantity relatively small.
Based on the above, it is estimated that you may have the following business requirements. Recommended strategies are as follows:
For functional testing in TDSQL with no special performance requirements: 2 shards with 2 GB of memory and 25 GB of disk capacity each.
In initial stage of business when the total size of data is small but grows fast: 2 shards with 16 GB of memory and 200 GB of disk capacity each.
In stable development stage when sharding is based on actual business conditions: 4 shards, and the specification for each one should be current business peak * growth rate / 4.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback