Aurora Initial Connection Strategy Plugin

December 15, 2025 ยท View on GitHub

The Aurora Initial Connection Strategy Plugin allows users to configure their initial connection strategy, and helps obtain connections more reliably during DNS updates by replacing an out-of-date endpoint. When the Aurora Initial Connection Strategy Plugin attempts to make a connection, it may retry the connection attempt if there is a failure. Users can configure the retry frequency and maximum time allowed to obtain a connection using the connection parameters.

When this plugin is enabled and the initial connection is to a reader cluster endpoint, the connected reader host will be chosen based on the configured strategy. The initial connection strategy specifies how the driver determines which available reader to connect to.

This plugin also helps retrieve connections more reliably. When a user connects to a cluster endpoint, the actual instance for a new connection is resolved by DNS. During failover, the cluster elects another instance to be the writer. While DNS is updating, which can take up to 40-60 seconds, if a user tries to connect to the cluster endpoint, they may be connecting to an old node. This plugin helps by replacing the out-of-date endpoint if DNS is updating.

Enabling the Aurora Initial Connection Strategy Plugin

To enable the Aurora Initial Connection Strategy Plugin, add initialConnection to the plugins value.

Aurora Initial Connection Strategy Connection Parameters

The following properties can be used to configure the Aurora Initial Connection Strategy Plugin.

ParameterValueRequiredDescriptionExampleDefault Value
readerInitialConnectionHostSelectorStrategyStringNoThe strategy that will be used to select a new reader host when opening a new connection.

For more information on the available reader selection strategies, see this table.
leastConnectionsrandom
initialConnectionRetryTimeoutMsIntegerNoThe maximum allowed time for retries when opening a connection in milliseconds.4000030000
initialConnectionRetryIntervalMsIntegerNoThe time between retries when opening a connection in milliseconds.20001000
verifyInitialConnectionTypeStringNoForce to verify an opened connection to be either writer or reader.reader``