The Custom Endpoint Plugin adds support for RDS custom endpoints. When the Custom Endpoint Plugin is in use, the driver will analyse custom endpoint information to ensure instances used in connections are part of the custom endpoint being used. This includes connections used in failover and read-write splitting.
- This plugin requires the following packages to be installed:
- If needed, create a custom endpoint using the AWS RDS Console:
- If needed, review the documentation about creating a custom endpoint.
- Add the plugin code
customEndpoint
to theplugins
value, or to the current driver profile. - If you are using the failover plugin, set the failover parameter
failoverMode
according to the custom endpoint type. For example, if the custom endpoint you are using is of typeREADER
, you can setfailoverMode
tostrict-reader
, or if it is of typeANY
, you can setfailoverMode
toreader-or-writer
. - Specify parameters that are required or specific to your case.
Parameter | Value | Required | Description | Default Value | Example Value |
---|---|---|---|---|---|
customEndpointRegion |
String | No | The region of the cluster's custom endpoints. If not specified, the region will be parsed from the URL. | null |
us-west-1 |
customEndpointInfoRefreshRateMs |
number | No | Controls how frequently custom endpoint monitors fetch custom endpoint info, in milliseconds. | 10000 |
20000 |
customEndpointMonitorExpirationMs |
number | No | Controls how long a monitor should run without use before expiring and being removed, in milliseconds. | 900000 (15 minutes) |
600000 |
waitForCustomEndpointInfo |
boolean | No | Controls whether to wait for custom endpoint info to become available before connecting or executing a method. Waiting is only necessary if a connection to a given custom endpoint has not been opened or used recently. Note that disabling this may result in occasional connections to instances outside of the custom endpoint. | true |
true |
waitForCustomEndpointInfoTimeoutMs |
number | No | Controls the maximum amount of time that the plugin will wait for custom endpoint info to be made available by the custom endpoint monitor, in milliseconds. | 10000 |
7000 |