forked from docs/doc-exports
Reviewed-by: Wagner, Fabian <fabian.wagner@t-systems.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
43 lines
9.1 KiB
HTML
43 lines
9.1 KiB
HTML
<a name="rds_11_0018"></a><a name="rds_11_0018"></a>
|
||
|
||
<h1 class="topictitle1">Configuring the Delay Threshold and Routing Policy</h1>
|
||
<div id="body0000001533244561"><p id="rds_11_0018__en-us_topic_0200110322_p4233133394314">After database proxy is enabled and read replicas are created, you can configure the delay threshold and routing policy as required.</p>
|
||
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_11_0018__en-us_topic_0200110322_table1880385504715" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Read/write splitting parameters</caption><thead align="left"><tr id="rds_11_0018__en-us_topic_0200110322_row1080465516471"><th align="left" class="cellrowborder" valign="top" width="16.7%" id="mcps1.3.2.2.3.1.1"><p id="rds_11_0018__en-us_topic_0200110322_p88041855164719"><strong id="rds_11_0018__b64581643201811">Parameter</strong></p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="83.3%" id="mcps1.3.2.2.3.1.2"><p id="rds_11_0018__en-us_topic_0200110322_p3804155184711"><strong id="rds_11_0018__b871715215189">Description</strong></p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="rds_11_0018__en-us_topic_0200110322_row10804055114711"><td class="cellrowborder" valign="top" width="16.7%" headers="mcps1.3.2.2.3.1.1 "><p id="rds_11_0018__en-us_topic_0200110322_p280412553479">Delay Threshold</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="83.3%" headers="mcps1.3.2.2.3.1.2 "><p id="rds_11_0018__en-us_topic_0200110322_p966818123292">The maximum delay for data to be synchronized from primary DB instances to read replicas. If a read replica's delay goes beyond the configured limit, read requests will not be forwarded to this read replica to prevent prolonged data mismatches with the primary DB instance. This happens no matter what read weight the read replica has.</p>
|
||
<p id="rds_11_0018__p1087172616125">In read/write splitting scenarios, the default delay threshold is 30s and the default value range is 0–7,200s. It is recommended that the threshold be greater than or equal to 30s. Traffic is not allocated to read replicas whose delay exceeds the configured threshold.</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="rds_11_0018__en-us_topic_0200110322_row1804105517474"><td class="cellrowborder" valign="top" width="16.7%" headers="mcps1.3.2.2.3.1.1 "><p id="rds_11_0018__en-us_topic_0200110322_p4804855174710">Read Weight Distribution</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="83.3%" headers="mcps1.3.2.2.3.1.2 "><p id="rds_11_0018__p10764143674615">In read/write splitting scenarios, you can configure read weights for the primary DB instance and read replicas. If no read replicas are selected for the database proxy, read/write splitting does not take effect.</p>
|
||
<p id="rds_11_0018__p13983215162118">The read weight ranges from 1 to 1,000. Read replicas with higher read weight distributions process more read requests. For example, if the read weights distributed to one primary DB instance and four read replicas are 0, 100, 200, 500, and 300, respectively, the primary DB instance does not process any read requests (write requests are still automatically routed to the primary DB instance) while the four read replicas process read requests with a ratio of 1:2:5:3.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="section" id="rds_11_0018__en-us_topic_0200110322_section125241526194010"><h4 class="sectiontitle">Configuring Delay Threshold</h4><ol id="rds_11_0018__en-us_topic_0200110322_ol3291184654019"><li id="rds_11_0018__li17616348171"><span>Log in to the management console.</span></li><li id="rds_11_0018__li146168481712"><span>Click <span><img id="rds_11_0018__rds_modify_instance_name_en-us_topic_0192953815_image192529212293" src="en-us_image_0000001191211679.png"></span> in the upper left corner and select a region and a project.</span></li><li id="rds_11_0018__li96167481711"><span>Click <strong id="rds_11_0018__rds_modify_instance_name_b171171523153019">Service List</strong>. Under <strong id="rds_11_0018__rds_modify_instance_name_b111722319302">Database</strong>, click <strong id="rds_11_0018__rds_modify_instance_name_b15118152363010">Relational Database Service</strong>. The RDS console is displayed.</span></li><li id="rds_11_0018__en-us_topic_0200110322_li0292154612401"><span>On the <strong id="rds_11_0018__b20826175219012">Instances</strong> page, click the target DB instance.</span></li><li id="rds_11_0018__li2573101655119"><span>In the navigation pane on the left, click <strong id="rds_11_0018__b9729101719569">Database Proxy</strong>.</span></li><li id="rds_11_0018__en-us_topic_0200110322_li19292346184012"><span>In the proxy information area, click <span><img id="rds_11_0018__image724311377120" src="en-us_image_0000001482124730.png"></span> next to the <strong id="rds_11_0018__b17199152415314">Delay Threshold</strong> field.</span></li></ol>
|
||
</div>
|
||
<div class="section" id="rds_11_0018__section6702360565"><h4 class="sectiontitle">Configuring Routing Policy in Single-Proxy Mode</h4><ol id="rds_11_0018__ol3558445102017"><li id="rds_11_0018__li1615361720561"><span>Log in to the management console.</span></li><li id="rds_11_0018__li1915316171569"><span>Click <span><img id="rds_11_0018__rds_modify_instance_name_en-us_topic_0192953815_image192529212293_1" src="en-us_image_0000001191211679.png"></span> in the upper left corner and select a region and a project.</span></li><li id="rds_11_0018__li015417172563"><span>Click <strong id="rds_11_0018__rds_modify_instance_name_b171171523153019_1">Service List</strong>. Under <strong id="rds_11_0018__rds_modify_instance_name_b111722319302_1">Database</strong>, click <strong id="rds_11_0018__rds_modify_instance_name_b15118152363010_1">Relational Database Service</strong>. The RDS console is displayed.</span></li><li id="rds_11_0018__li18910455132018"><span>On the <strong id="rds_11_0018__b173620388109">Instances</strong> page, click the target DB instance.</span></li><li id="rds_11_0018__li161805115552"><span>In the navigation pane on the left, click <strong id="rds_11_0018__b429514219569">Database Proxy</strong>.</span></li><li id="rds_11_0018__li291115513205"><span>If proxy load balancing is not enabled, click <strong id="rds_11_0018__b1255516256174">Configure</strong> next to the <strong id="rds_11_0018__b13276144133818">Routing Policy</strong> field in the proxy information area. In the displayed dialog box, configure read weights for the primary instance and read replicas.</span><p><div class="note" id="rds_11_0018__note166441534162511"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="rds_11_0018__ul37391143185418"><li id="rds_11_0018__li177391543165413">The system automatically distributes weights to read replicas, including read replicas created afterwards, according to the default distribution rules. If a read replica breaks down or is deleted, the weight is automatically removed. After the read replica recovers, the weight is automatically restored.</li><li id="rds_11_0018__li19740743185410">If the weight of a node is set to <strong id="rds_11_0018__b76718586242">0</strong>, read requests will not be routed to the node. If the weights of all nodes are set to <strong id="rds_11_0018__b20953315102719">0</strong>, read requests will be randomly routed to these nodes.</li></ul>
|
||
</div></div>
|
||
</p></li><li id="rds_11_0018__li43750426178"><span>Click <strong id="rds_11_0018__b18736152320270">OK</strong> and view the weights on the <strong id="rds_11_0018__b1947923182810">Database Proxy</strong> page.</span></li><li id="rds_11_0018__li13397411201016"><span>If proxy load balancing is enabled, click <strong id="rds_11_0018__b2351608393">Configure</strong> next to the <strong id="rds_11_0018__b118150393910">Routing Policy</strong> field in the proxy information area. In the displayed dialog box, set required parameters.</span><p><p id="rds_11_0018__p15170111132315">Select <strong id="rds_11_0018__b1261217214473">Load balancing</strong> as the routing policy. Read requests will be automatically distributed to read replicas based on the number of active connections to balance the load among these read replicas.</p>
|
||
<div class="p" id="rds_11_0018__p6171171119235">Set <strong id="rds_11_0018__b11583745404">Reads Allowed on Primary</strong>:<ul id="rds_11_0018__ul10571115614"><li id="rds_11_0018__li11581145614"><strong id="rds_11_0018__b13695155512473">Yes</strong>: Read requests can be routed to both the primary instance and read replicas, which increases the load of the primary instance to some extent. Configure this parameter based on your workload requirements.</li><li id="rds_11_0018__li18514111565"><strong id="rds_11_0018__b154852485347">No</strong>: To offload read pressure from the primary instance, read requests are only routed to read replicas.</li></ul>
|
||
</div>
|
||
</p></li><li id="rds_11_0018__li1922412920120"><span>Click <strong id="rds_11_0018__b16488184481">OK</strong>. On the <strong id="rds_11_0018__b12835152914499">Database Proxy</strong> page, view the result. You can select the instances for load balancing as required.</span></li></ol>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="rds_11_0050.html">Database Proxy (Read/Write Splitting)</a></div>
|
||
</div>
|
||
</div>
|
||
|