When configuring the DAX JavaScript SDK client, you can customize various parameters to optimize performance, connection handling, and error resilience. The following table outlines the default configuration settings that control how your client interacts with the DAX cluster, including timeout values, retry mechanisms, credential management, and health monitoring options. For more information, see DynamoDBClient Operations.
Parameter | Type | Description |
---|---|---|
optional |
|
The AWS Region to use for the DAX client (example - 'us-east-1'). This is a required parameter if not provided through the environment variable. |
required |
|
The endpoint of the Cluster to which the SDK connects. Examples: Non-encrypted – dax-cluster-name.region.amazonaws.com Encrypted – daxs://my-cluster.l6fzcv.dax-clusters.us-east-1.amazonaws.com |
default 6000 ms |
|
This defines the maximum time the client will wait for a response from DAX. |
default 1 |
|
The number of retries to attempt for write requests that fail. |
default 1 |
|
The number of retries to attempt for read requests that fail. |
default 1 |
|
The maximum number of retries to attempt on failed requests. If readRetries/writeRetries are set, then the configuration set in readRetries and writeRetries take priority over maxRetries. |
default 10000 ms |
|
The timeout (in milliseconds) for establishing a connection to any of the cluster nodes. |
default 7000 ms |
|
When the DAX server indicates recover is needed by setting
|
optional |
The AWS credentials to use for authenticating requests. This can be provided as an AwsCredentialIdentity or an AwsCredentialIdentityProvider. If not provided, the AWS SDK will automatically use the default credentials provider chain. Example: `{ accessKeyId: 'AKIA...', secretAccessKey: '...', sessionToken: '...' }` * @default Uses default AWS credentials provider chain. |
|
default 5000 ms |
|
The interval (in milliseconds) between cluster health checks. A lower interval will check more frequently. |
default 1000 ms |
|
The timeout (in milliseconds) for the health check to complete. |
default false |
|
Skip hostname verification of TLS connections. This has no impact on un-encrypted clusters. The default is to perform hostname verification, setting this to True will skip verification. Be sure you understand the implication of turning it off, which is the inability to authenticate the cluster that you are connecting to. |
default 5 |
|
Sets the number of consecutive errors required to signal node unhealthy within health check interval. |
default 4000 ms |
|
Returns the interval between polling of cluster members for membership changes. |
default 125 |
|
Returns the threshold below which the cluster will not be polled for membership changes. |
optional | default null |
User Defined Provider for AWS credentials used to authenticate requests to DAX. |
Name | Type | Detail |
---|---|---|
|
DaxDocument |
Instance of DaxDocument type. |
|
number |
Determines the number of items per page. |
Optional |
any |
LastEvaluatedKey from previous response can be used for subsequent requests. |
For usage of pagination, see TryDax.js.