diff --git a/docs/using-the-nodejs-wrapper/using-plugins/UsingTheReadWriteSplittingPlugin.md b/docs/using-the-nodejs-wrapper/using-plugins/UsingTheReadWriteSplittingPlugin.md index 6808f57d..6ee4473d 100644 --- a/docs/using-the-nodejs-wrapper/using-plugins/UsingTheReadWriteSplittingPlugin.md +++ b/docs/using-the-nodejs-wrapper/using-plugins/UsingTheReadWriteSplittingPlugin.md @@ -37,7 +37,7 @@ The Read/Write Splitting Plugin is not currently supported for non-Aurora cluste ## Internal Connection Pooling > [!WARNING] -> If internal connection pools are enabled, database passwords may not be verified with every connection request. The initial connection request for each database instance in the cluster will verify the password, but subsequent requests may return a cached pool connection without re-verifying the password. This behavior is inherent to the nature of connection pools in general and not a bug with the wrapper. `await .releaseResources()` can be called to close all pools and remove all cached pool connections. See [Internal Connection Pool Password Warning Example for Postgres](../../../examples/aws_driver_example/aws_interal_connection_pool_password_warning_postgres_example.ts) and [Internal Connection Pool Password Warning Example for MySQL](../../../examples/aws_driver_example/aws_internal_connection_pool_password_warning_mysql_example.ts) +> If internal connection pools are enabled, database passwords may not be verified with every connection request. The initial connection request for each database instance in the cluster will verify the password, but subsequent requests may return a cached pool connection without re-verifying the password. This behavior is inherent to the nature of connection pools in general and not a bug with the wrapper. `await .releaseResources()` can be called to close all pools and remove all cached pool connections. See [Internal Connection Pool Password Warning Example for Postgres](../../../examples/aws_driver_example/aws_internal_connection_pool_password_warning_postgres_example.ts) and [Internal Connection Pool Password Warning Example for MySQL](../../../examples/aws_driver_example/aws_internal_connection_pool_password_warning_mysql_example.ts) Whenever `await setReadOnly(true)` is first called on a `AwsClient` object, the read/write plugin will internally open a new physical connection to a reader. After this first call, the physical reader connection will be cached for the given `AwsClient`. Future calls to `setReadOnly` on the same `AwsClient` object will not require opening a new physical connection. However, calling `await setReadOnly(true)` for the first time on a new `AwsClient` object will require the plugin to establish another new physical connection to a reader. If your application frequently calls `setReadOnly`, you can enable internal connection pooling to improve performance. When enabled, the wrapper driver will maintain an internal connection pool for each instance in the cluster. This allows the read/write splitting plugin to reuse connections that were established by `setReadOnly` calls on previous `AwsClient` objects. diff --git a/examples/aws_driver_example/aws_interal_connection_pool_password_warning_postgres_example.ts b/examples/aws_driver_example/aws_internal_connection_pool_password_warning_postgres_example.ts similarity index 97% rename from examples/aws_driver_example/aws_interal_connection_pool_password_warning_postgres_example.ts rename to examples/aws_driver_example/aws_internal_connection_pool_password_warning_postgres_example.ts index 71d3909e..d56d2a96 100644 --- a/examples/aws_driver_example/aws_interal_connection_pool_password_warning_postgres_example.ts +++ b/examples/aws_driver_example/aws_internal_connection_pool_password_warning_postgres_example.ts @@ -14,7 +14,6 @@ limitations under the License. */ -import { ConnectionProviderManager } from "../../common/lib/connection_provider_manager"; import { InternalPooledConnectionProvider } from "../../common/lib/internal_pooled_connection_provider"; import { logger } from "../../common/logutils"; import { AwsPGClient } from "../../pg/lib";