Skip to content

Commit 2a87614

Browse files
docs: add enableFailoverStrictReader parameter to the documentation (#457)
1 parent 317b53d commit 2a87614

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,16 +219,16 @@ There are many different types of URLs that can connect to an Aurora DB cluster;
219219
Note: The connection string follows standard URL parameters. In order to add parameters to the connection string, simply add `?` and then the `parameter_name=value` pair at the end of the connection string. You may add multiple parameters by separating the parameter name and value set (`parameter_name=value`) with the `&` symbol. For example, to add 2 parameters simply add `?param_name=value&param_2=value2` at the end of the connection string.
220220
221221
222-
| URL Type | Example | Required Parameters | Driver Behavior |
223-
|-----------------------------------------------|--------------------------------------------------------------------------------------|:----------------------------:|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
224-
| Cluster Endpoint | `jdbc:mysql:aws://db-identifier.cluster-XYZ.us-east-2.rds.amazonaws.com:3306` | None | *Initial connection:* primary DB instance<br/>*Failover behavior:* connect to the new primary DB instance |
225-
| Read-Only Cluster Endpoint | `jdbc:mysql:aws://db-identifier.cluster-ro-XYZ.us-east-2.rds.amazonaws.com:3306` | None | *Initial connection:* any Aurora Replica<br/>*Failover behavior:* prioritize connecting to any active Aurora Replica but might connect to the primary DB instance if it provides a faster connection |
226-
| Instance Endpoint | `jdbc:mysql:aws://instance-1.XYZ.us-east-2.rds.amazonaws.com:3306` | None | *Initial connection:* the instance specified (DB instance 1)<br/>*Failover behavior:* connect to the primary DB instance |
227-
| RDS Custom Cluster | `jdbc:mysql:aws://db-identifier.cluster-custom-XYZ.us-east-2.rds.amazonaws.com:3306` | None | The driver does not support custom clusters yet. *Initial connection:* the primary instance in the cluster<br/>*Failover behavior:* connect to the primary DB instance |
228-
| IP Address | `jdbc:mysql:aws://10.10.10.10:3306` | `clusterInstanceHostPattern` | *Initial connection:* the DB instance specified<br/>*Failover behavior:* connect to the primary DB instance |
229-
| Custom Domain | `jdbc:mysql:aws://my-custom-domain.com:3306` | `clusterInstanceHostPattern` | *Initial connection:* the DB instance specified<br/>*Failover behavior:* connect to the primary DB instance |
230-
| Non-Aurora Endpoint | `jdbc:mysql:aws://localhost:3306` | None | A regular JDBC connection will be returned - no failover functionality |
231-
| Aurora Endpoint<br/>(through a custom tunnel) | `jdbc:mysql:aws://localhost:3306` | `clusterInstanceHostPattern` | *Initial connection:* the DB instance specified<br/>*Failover behavior:* connect to the primary DB instance |
222+
| URL Type | Example | Required Parameters | Driver Behavior |
223+
|-----------------------------------------------|--------------------------------------------------------------------------------------|:----------------------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
224+
| Cluster Endpoint | `jdbc:mysql:aws://db-identifier.cluster-XYZ.us-east-2.rds.amazonaws.com:3306` | None | *Initial connection:* primary DB instance<br/>*Failover behavior:* connect to the new primary DB instance |
225+
| Read-Only Cluster Endpoint | `jdbc:mysql:aws://db-identifier.cluster-ro-XYZ.us-east-2.rds.amazonaws.com:3306` | None | *Initial connection:* any Aurora Replica<br/>*Failover behavior:* prioritize connecting to any active Aurora Replica but might connect to the primary DB instance if it provides a connection first |
226+
| Instance Endpoint | `jdbc:mysql:aws://instance-1.XYZ.us-east-2.rds.amazonaws.com:3306` | None | *Initial connection:* the instance specified (DB instance 1)<br/>*Failover behavior:* connect to the primary DB instance |
227+
| RDS Custom Cluster | `jdbc:mysql:aws://db-identifier.cluster-custom-XYZ.us-east-2.rds.amazonaws.com:3306` | None | The driver does not support custom clusters yet. *Initial connection:* the primary instance in the cluster<br/>*Failover behavior:* connect to the primary DB instance |
228+
| IP Address | `jdbc:mysql:aws://10.10.10.10:3306` | `clusterInstanceHostPattern` | *Initial connection:* the DB instance specified<br/>*Failover behavior:* connect to the primary DB instance |
229+
| Custom Domain | `jdbc:mysql:aws://my-custom-domain.com:3306` | `clusterInstanceHostPattern` | *Initial connection:* the DB instance specified<br/>*Failover behavior:* connect to the primary DB instance |
230+
| Non-Aurora Endpoint | `jdbc:mysql:aws://localhost:3306` | None | A regular JDBC connection will be returned - no failover functionality |
231+
| Aurora Endpoint<br/>(through a custom tunnel) | `jdbc:mysql:aws://localhost:3306` | `clusterInstanceHostPattern` | *Initial connection:* the DB instance specified<br/>*Failover behavior:* connect to the primary DB instance |
232232
233233
Information about the `clusterInstanceHostPattern` parameter is provided in the section below.
234234
@@ -304,6 +304,7 @@ In addition to [the parameters that you can configure for the MySQL Connector/J
304304
| `gatherMetricsPerInstance` | Boolean | No | Set to true to gather additional performance metrics per instance as well as cluster. Set to false to only gather performance metrics per cluster. <br><br>To print collected metrics at instance level, call `IClusterAwareMetricsReporter.reportMetrics(String connUrl, Log log, true)`. | `false` |
305305
| `allowXmlUnsafeExternalEntity` | Boolean | No | Set to true if you would like to use XML inputs that refer to external entities. WARNING: Setting this to true is unsafe since your system to be prone to XXE attacks. | `false` |
306306
| `keepSessionStateOnFailover` | Boolean | No | This parameter will allow connections to retain the session state after failover. When `keepSessionStateOnFailover` is set to false, connections will need to be reconfigured as seen in the examples [here](#08007---Transaction-Resolution-Unknown). When this parameter is true, the `autocommit`, `sessionMaxRows` and `transactionIsolation` values will be kept. This parameter is only necessary when the session state must be retained and the connection cannot be manually reconfigured by the user. <br><br> **Please note:** this parameter will not be able to fully restore the connection session state, as it will only save the `autocommit`, `sessionMaxRows` and `transactionIsolation` values. | `false` |
307+
| `enableFailoverStrictReader` | Boolean | No | Set to true to only allow failover to reader nodes during the reader failover process. If enabled, reader failover to a writer node will only be allowed for single-node clusters. This logic mimics the logic of the Aurora read-only cluster endpoint. | `false` |
307308
308309
### Failover Exception Codes
309310
#### 08001 - Unable to Establish SQL Connection

0 commit comments

Comments
 (0)