Amazon Aurora Limitless Database is a new type of database that can horizontally scale to handle millions of write transactions per second and manage petabytes of data. Users will be able to use the AWS JDBC Driver with Aurora Limitless Databases and optimize their experience using the Limitless Connection Plugin. To learn more about Aurora Limitless Database, see the Amazon Aurora Limitless documentation.
Aurora Limitless Database introduces a new endpoint for the databases - the DB shard group (limitless) endpoint that's managed by Route 53. When connecting to Aurora Limitless Database, clients will connect using this endpoint, and be routed to a transaction router via Route 53. Unfortunately, Route 53 is limited in its ability to load balance, and can allow uneven work loads on transaction routers. The Limitless Connection Plugin addresses this by performing client-side load balancing with load awareness.
The Limitless Connection Plugin achieves this with a monitoring thread that periodically polls for available transaction routers and their load metrics, and then caches them. When a new connection is made, the plugin directs the connection to a transaction router selected from the cache using a weighted round-robin strategy. Routers with a higher load are assigned a lower weight, and routers with a lower load are assigned a higher weight.
To enable the Limitless Connection Plugin, add the plugin code limitless
to the wrapperPlugins
value, or to the current driver profile.
The URL used to connect to a limitless database is the DB shard group URL.
Parameter | Value | Required | Description | Default Value | Example Value |
---|---|---|---|---|---|
limitlessTransactionRouterMonitorIntervalMs |
Integer | No | This property is the interval in milliseconds, that the plugin polls the database for available transaction routers and their load metrics. A lower value will increase the frequency of polling, and a higher value will decrease the frequency of polling. Note that there will always be a delay between when the database updates its load metric info and when the Limitless Connection Plugin polls for it. If your Limitless database experiences fluctuating load between transaction routers, you may want to consider lowering limitlessTransactionRouterMonitorIntervalMs to reduce this delay and ensure the Limitless Connection Plugin load balancing has fresher info to work with. The default value of this property is 7.5 seconds. This is half the interval that the database updates its load metric metadata. This value was chosen as a compromise between having fresher load metric info, but also being conscious of the associated overhead. |
7500 |
30000 |
limitlessTransactionRouterMonitorDisposalTimeMs |
Integer | No | This property is the time in milliseconds that a Limitless transaction router monitor can remain unused before it is disposed. This ensures that in periods of long inactivity, the database isn't being needlessly polled and the resources associated with the monitor can be cleaned up. Note that when a new connection is created, a new Limitless transaction router monitor will also be created to resume polling the database. | 600000 |
300000 |
limitlessConnectMaxRetries |
Integer | No | This property is the max number of retries the Limitless Connection Plugin will attempt when failing to connect to the database. During these retries, the plugin will attempt to connect to the least loaded transaction router that is available. If the max number of connection retries is exceeded, then the plugin will throw a SQLException . In this scenario, it is likely that the database is in an unhealthy state, and the SQLException should be caught and handled by your application. |
5 |
13 |
limitlessWaitForTransactionRouterInfo |
Boolean | No | In scenarios such as application start-up, the cache of available transaction routers and their load metric info will be empty. If limitlessWaitForTransactionRouterInfo is set to true , the plugin will wait until the cache is populated before selecting a transaction router and connecting to it. This may be beneficial for applications that create a large number of connections on start-up, since these connections will be load-balanced. Alternatively, if this property set to false and the cache is empty, the plugin will not wait for the cache to be populated and default to using the DB Shard Group endpoint to connect to until the cache is populated. This will result in connections being routed to a transaction router via Route 53 until the cache is populated. This may be beneficial for applications that prioritize quicker start-up times at the expense of some early connections not being load-balanced by the Limitless Connection Plugin. |
true |
false |
limitlessGetTransactionRouterInfoMaxRetries |
Integer | No | This property is the max number of times the Limitless Connection Plugin will retry fetching available transaction routers and their load metrics. These retries will occur if the fetched transaction router information is null or empty. If this max is reached, a SQLException will be thrown. In this scenario, it is likely that the database is in an unhealthy state, and the thrown SQLException should be caught and handled by your application. If your application prioritizes failing fast, then consider a lower value for this property. However, if your application prioritizes durability, then consider a higher value. |
5 |
10 |
limitlessGetTransactionRouterInfoRetryIntervalMs |
Integer | No | This property is the interval in milliseconds between retries of fetching available transaction routers and their load metrics. If your application prioritizes failing fast, then consider a lower value for this property. However, if your application prioritizes durability, then consider a higher value. |
300 |
1000 |
The Limitless Connection Plugin is compatible with authentication type plugins such as the IAM and AWS Secrets Manager Plugins.
Important
The Failover, Host Monitoring, and Read Write Splitting Plugins are also compatible with the Limitless Connection Plugin.
However, we don't recommend using them with the Limitless Connection Plugin because they're not designed to be used with Aurora Limitless Database.
They don't provide any extra value, and add unnecessary computation and memory overhead.
Connection pools keep connections open for reuse, but this can work against the client-side load-balancing of the Limitless Connection Plugin and cause an imbalanced load on transaction routers.
To mitigate this, consider setting connection properties that can reduce the number of idle connections or increase the lifetime of connections.
If you're using HikariCP, some of these properties are idleTimeout
, maxLifetime
, minimumIdle
.