forked from docs/doc-exports
Reviewed-by: Wagner, Fabian <fabian.wagner@t-systems.com> Co-authored-by: Ru, Li Yi <liyiru7@huawei.com> Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
27 lines
3.7 KiB
HTML
27 lines
3.7 KiB
HTML
<a name="ddm_03_0068"></a><a name="ddm_03_0068"></a>
|
|
|
|
<h1 class="topictitle1">Overview and Application Scenarios</h1>
|
|
<div id="body0000001270880872"><div class="section" id="ddm_03_0068__section681920338520"><h4 class="sectiontitle">Overview</h4><p id="ddm_03_0068__p1033122515594">Shard configuration is a core function of DDM. With this function, you can increase data nodes or shards to improve database storage and concurrency as services grow. Shard configuration has little impacts on your services, so you do not need to worry about database scaling and subsequent O&M as your services are burst.</p>
|
|
</div>
|
|
<div class="section" id="ddm_03_0068__section19322231998"><h4 class="sectiontitle">Application Scenarios</h4><p id="ddm_03_0068__p167731184717">DDM provides the following methods of configuring shards to meet different service needs.</p>
|
|
<p id="ddm_03_0068__p148367301917"><strong id="ddm_03_0068__b2600205519464">Method 1: Keep shards unchanged and increase data nodes</strong></p>
|
|
<p id="ddm_03_0068__p16743522434">This method does not change the number of shards and only increases the number of data nodes. Some shards are migrated from original data nodes to new data nodes. The shard data is not redistributed, so this method is the fastest one among all three methods and is recommended.</p>
|
|
<p id="ddm_03_0068__p274302218315">This method underpins rapid service growth after horizontal sharding and can reduce costs at the early stage of services. It is also suitable if RDS for MySQL instances cannot meet storage space and read/write performance requirements.</p>
|
|
<div class="fignone" id="ddm_03_0068__fig774315221631"><span class="figcap"><b>Figure 1 </b>Adding RDS for MySQL instances with shards unchanged</span><br><span><img id="ddm_03_0068__image138931015121911" src="en-us_image_0000001685147678.png"></span></div>
|
|
<p id="ddm_03_0068__p1181213301691"><strong id="ddm_03_0068__b169714394589">Method 2: Add shards with data nodes unchanged</strong></p>
|
|
<p id="ddm_03_0068__p1887265524019">This method adds shards, but not data nodes. It changes total shards, total table shards, and table sharding rules. Data is redistributed to all shards. Old tables in original shards will be deleted, and broadcast tables are increased.</p>
|
|
<p id="ddm_03_0068__p149651429172013">This method is suitable if the associated RDS for MySQL instance has sufficient storage space but one of its tables contains a large amount of data, with query performance limited.</p>
|
|
<div class="fignone" id="ddm_03_0068__fig12103856122910"><span class="figcap"><b>Figure 2 </b>Adding shards with RDS for MySQL instances unchanged</span><br><span><img id="ddm_03_0068__image545212259207" src="en-us_image_0000001685307426.png"></span></div>
|
|
<p id="ddm_03_0068__p127932302916"><strong id="ddm_03_0068__b12124523593">Method 3: Add both shards and data nodes</strong></p>
|
|
<p id="ddm_03_0068__p54510169313">This method increases both shards and data nodes. It changes total shards, total table shards, and table sharding rules. Data is redistributed to all shards. Old tables in original shards will be deleted, and broadcast tables are increased.</p>
|
|
<p id="ddm_03_0068__p46411720191919">This method is suitable if RDS for MySQL instances cannot meet storage space and read/write requirements and there is a physical table containing a large amount of data with query performance limited.</p>
|
|
<div class="fignone" id="ddm_03_0068__fig15127124312920"><span class="figcap"><b>Figure 3 </b>Adding shards and RDS for MySQL instances</span><br><span><img id="ddm_03_0068__image156862334230" src="en-us_image_0000001733266613.png"></span></div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_03_0131.html">Shard Configuration</a></div>
|
|
</div>
|
|
</div>
|
|
|