Updated on 2025-08-11 GMT+08:00

Introduction to RDS for MySQL Database Proxy

Database Proxy is a network proxy service that sits between RDS for MySQL and applications. It is used to handle all requests from the applications to access RDS for MySQL instances.

Read/write splitting enables read and write requests to be automatically routed through a database proxy address. After creating an RDS for MySQL instance, you can enable database proxy. Through the proxy address, write requests are routed to the primary instance and read requests to read replicas based on the routing policy of the proxy, reducing the read pressure of the primary instance.

Introduction Video

Basic Concepts

How Read/Write Splitting Works

Read/write splitting uses database proxies to split read and write requests. You can create one or more database proxies for your DB instance.

If your RDS for MySQL instance has only one database proxy, applications connect to the database proxy through the proxy address. Write requests are forwarded to the primary instance and read requests to the primary instance or read replicas based on the routing policy you specify.

Figure 1 Read/write splitting with only one database proxy

To isolate workloads from one another, you can create up to four database proxies for an RDS for MySQL instance. Different applications can connect to different database proxies as required. The database proxies connect to specified read replicas and forward read requests from different applications to different read replicas for workload isolation.

Figure 2 Read/write splitting with multiple database proxies

Advantages of Read/Write Splitting

  • Read/write splitting enables read and write requests to be automatically routed. You can easily scale out a database proxy as required at low maintenance costs.
  • Read requests are distributed to your read replicas based on weights to balance your database traffic and improve resource utilization.
  • A proxy routes read requests of your application only to the read replicas you specify for the proxy.
  • By default, database proxies provide overload protection to prevent operations with large result sets from causing out of memory (OOM) exceptions of the server. If the database kernel pressure is high, database traffic throttling is required.

Request Routing Rules

Billing

Database proxy can be enabled for purchased DB instances. After it is enabled, it is separately billed.

Database proxy supports only pay-per-use billing.

The database proxy service is available for commercial use. It is billed by node. When you purchase a database proxy instance on the console, two nodes are created by default. The total fee is calculated as follows: Total fee = Number of nodes x Unit price. For details about the unit price, see the price of database proxy in RDS Pricing Details.