The database proxy for RDS MySQL offers a nearest access feature. In a multi-availability zone deployment, enabling this feature connects applications to proxy nodes within the same availability zone. This co-locates your applications, proxy nodes, and read-only instances, significantly reducing network hops and latency. This improves data read speeds while maintaining cross-availability zone disaster recovery capabilities. You can still customize the read weight distribution between the primary instance and read-only instances for each proxy node.
How it works
If nearest access is disabled for your RDS MySQL database proxy, especially in a single-availability zone deployment, all traffic is routed through the proxy nodes in that zone. If your database instances are in a different availability zone than the proxy nodes, this requires cross-zone communication, which increases network latency, as shown in the following figure.
When nearest access is enabled in a dual-availability zone deployment, the database proxy endpoint routes requests only to proxy nodes within its own availability zone. Adding database instances from the same availability zone to this database proxy endpoint ensures that all traffic is handled within a single availability zone. This minimizes access latency, as shown in the following figure.
Prerequisites
Your RDS MySQL instance must meet the following requirements:
-
Version: MySQL 5.7, 8.0, or 8.4
-
Edition: High-availability Edition or Cluster Edition
-
Storage type: cloud disk
-
The database proxy is enabled with the following configuration. For instructions, see Enable the database proxy.
-
Proxy type: Dedicated
-
Deployment mode: Dual-availability zone deployment
-
Total number of nodes: 4
-
Billing
The nearest access feature is available at no additional cost.
Usage notes
-
Impact of migrating availability zones:
If nearest access is enabled and you need to migrate proxy availability zones, you must specify a destination vSwitch for each database proxy endpoint. After the migration, the configuration of each database proxy endpoint remains unchanged. The availability zone for nearest access is updated to that of the specified destination vSwitch.
-
Impact of changing the proxy configuration:
The nearest access feature supports only dedicated proxies in a dual-availability zone deployment with four proxy nodes. If you have nearest access enabled and want to change to a general-purpose proxy or another deployment type, you must first disable nearest access before you can modify the specifications. For more information about the proxy deployment architecture, see Proxy deployment architecture.
-
Impact on read weight allocation:
Enabling or disabling nearest access does not affect read weight allocation. The feature ensures that your application, proxy nodes, and read-only instances are co-located in the same availability zone to minimize latency from cross-zone access. However, the distribution of read traffic to your RDS MySQL instances is controlled by the read weights you configure, independent of the nearest access policy.
Enable or disable nearest access
You can enable or disable the nearest access feature at any time.
-
Go to the Instances page. In the top navigation bar, select the region of the target instance, and then click the instance ID.
-
In the navigation pane on the left, click Database Proxy.
-
In the Connection Information section, find the target database proxy endpoint and click Modify Configuration in the Actions column.
-
In the dialog box that appears, click Enable or Disable next to Nearest Access.
This setting change affects new connections only.
API reference
|
API |
Description |
|
Queries the details of the database proxy for an RDS instance. |
|
|
Queries the information about a database proxy endpoint. |
|
|
Modifies the access policy of a database proxy endpoint. |