From 2161d26ef89b0d8d18c6f6087019b4bf9c9946aa Mon Sep 17 00:00:00 2001 From: joyc-bq <95259163+joyc-bq@users.noreply.github.com> Date: Fri, 3 Jan 2025 14:20:34 -0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: crystall-bitquill <97126568+crystall-bitquill@users.noreply.github.com> --- .../UsingTheFastestResponseStrategyPlugin.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/using-the-nodejs-wrapper/using-plugins/UsingTheFastestResponseStrategyPlugin.md b/docs/using-the-nodejs-wrapper/using-plugins/UsingTheFastestResponseStrategyPlugin.md index 7d756b88..ba249d3a 100644 --- a/docs/using-the-nodejs-wrapper/using-plugins/UsingTheFastestResponseStrategyPlugin.md +++ b/docs/using-the-nodejs-wrapper/using-plugins/UsingTheFastestResponseStrategyPlugin.md @@ -9,7 +9,8 @@ The host response time is measured at an interval set by `responseMeasurementInt The plugin can be loaded by adding the plugin code `FastestResponseStrategy` to the [`plugins`](../UsingTheNodeJsWrapper#aws-advanced-nodejs-wrapper-parameters) parameter. The Fastest Response Strategy Plugin is not loaded by default, and must be loaded along with the [`readWriteSplitting`](./UsingTheReadWriteSplittingPlugin.md) plugin. > [!IMPORTANT]\ -> **`readerHostSelectorStrategy` must be set to `fastestReponse` when using this plugin. Otherwise an error will be thrown:** > `Unsupported host selector strategy: 'random'. To use the fastest response strategy plugin, please ensure the property readerHostSelectorStrategy is set to 'fastestResponse'.` +> **The `readerHostSelectorStrategy` parameter must be set to `fastestReponse` when using this plugin, otherwise an error will be thrown:** +> `Unsupported host selector strategy: 'random'. To use the fastest response strategy plugin, please ensure the property readerHostSelectorStrategy is set to 'fastestResponse'.` ```ts params = { @@ -31,8 +32,8 @@ await client.connect(); | Parameter | Value | Required | Description | Default Value | | ------------------------------- | :------: | :------: | :--------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -| `readerHostSelectorStrategy` | `string` | Yes | Setting to `fastestReponse` sets the reader host selector strategy to choose the fastest host using the Fastest Response Strategy Plugin | `random` | -| `responseMeasurementIntervalMs` | `number` | No | Interval in milliseconds between measuring response time to a database host | `30_000` | +| `readerHostSelectorStrategy` | `string` | Yes | Setting to `fastestReponse` sets the reader host selector strategy to choose the fastest host using the Fastest Response Strategy Plugin. | `random` | +| `responseMeasurementIntervalMs` | `number` | No | Interval in milliseconds between measuring response time to a database host. | `30_000` | ## Host Response Time Monitor @@ -57,9 +58,9 @@ const client = new AwsMySQLClient({ ``` > [!IMPORTANT]\ -> **When specifying a frt\_ prefixed timeout, always ensure you provide a non-zero timeout value** +> **When specifying a frt\_ prefixed timeout, always ensure you provide a non-zero timeout value.** ### Sample Code -[Postgres fastest response strategy sample code](../../../examples/aws_driver_example/fastest_response_strategy_postgres_example.ts)
+[PostgreSQL fastest response strategy sample code](../../../examples/aws_driver_example/fastest_response_strategy_postgres_example.ts)
[MySQL fastest response strategy sample code](../../../examples/aws_driver_example/fastest_response_strategy_mysql_example.ts)