This topic provides answers to frequently asked questions (FAQ) about PolarProxy provided by PolarDB.

  • Why am I unable to retrieve a record immediately after I insert the record?

    In a read/write splitting architecture, a delay occurs when data is being replicated among the primary node and read-only nodes. PolarDB supports session consistency to ensure that you can query updates within a session. You can retrieve the inserted record after the replication is complete. For more information, see the "Session consistency" section in Session consistency.

  • Can data be read immediately after it is written into PolarDB?

    No, data cannot be read immediately after the data is written into PolarDB. A delay of a few milliseconds occurs when you read data by using an endpoint for which read/write splitting is enabled, even if the loads on the primary node and read-only nodes of an PolarDB cluster are not heavy. To eliminate this delay, you can use the primary endpoint to connect to the PolarDB cluster. This way, read and write requests are sent to the primary node. For more information about how to view the primary endpoint, see View an endpoint.

  • Why do low loads exist on read-only nodes when the loads on the primary node are high?
    By default, requests in transactions are routed only to the primary node. To balance loads across the primary and read-only nodes, you can use the following solutions:
    • For stress testing that uses Sysbench, add --oltp-skip-trx=on to your code if Sysbench 0.5 is used or --skip-trx=on if Sysbench 1.0 is used. This way, you do not need to execute the BEGIN and COMMIT statements.
    • In actual usage, a large number of transactions can cause heavy loads on the primary node. In this case, you can enable the transaction splitting feature to reduce the loads on the primary node. For more information, see Transaction splitting.
  • Why does a node receive more requests than others?

    Requests are distributed to each node based on loads. The nodes on which lighter loads exist receive more requests.

  • Does a new read-only node automatically receive read requests?

    This depends on whether a session that supports read/write splitting is created after you add the read-only node. If yes, requests are automatically forwarded to the read-only node. If no, read requests are not forwarded to the read-only node. In this case, you can close a connection and then reconnect to your cluster. This way, read requests sent over the connection are forwarded to the read-only node. For example, you can restart your application to establish a new connection.

  • What are the differences between PolarProxy Enterprise Edition Standard Enterprise Edition and PolarProxy Enterprise Edition Dedicated Enterprise Edition?
    • Standard Enterprise Edition is used by clusters of the General-purpose General-purpose type of PolarDB for MySQL Cluster Edition, which shares CPU resources with smart elastic scaling within seconds provided based on business loads.
    • Dedicated Enterprise Edition is used by clusters of the Dedicated type of PolarDB for MySQL Cluster Edition, which exclusively uses allocated CPU resources and provides better stability.