Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ The benchmarks do not measure the performance of target JDBC drivers nor the per
## Usage
1. Build the benchmarks with the following command `../gradlew jmhJar`.
1. the JAR file will be outputted to `build/libs`
2. Run the benchmarks with the following command `java -jar build/libs/benchmarks-1.0.0-jmh.jar`.
2. Run the benchmarks with the following command `java -jar build/libs/benchmarks-1.0.1-jmh.jar`.
1. you may have to update the command based on the exact version of the produced JAR file
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ public void initAndReleaseBaseLine() throws SQLException {
}

@Benchmark
public ConnectionWrapper initAndReleaseWithAllPlugins() throws SQLException {
public ConnectionWrapper initAndReleaseWithExecutionTimePlugin() throws SQLException {
try (ConnectionWrapper wrapper = new ConnectionWrapper(
useAllPlugins(),
useExecutionTimePlugin(),
CONNECTION_STRING,
mockConnectionProvider)) {
wrapper.releaseResources();
Expand All @@ -124,9 +124,9 @@ public ConnectionWrapper initAndReleaseWithAllPlugins() throws SQLException {
}

@Benchmark
public ConnectionWrapper initAndReleaseWithExecutionTimePlugin() throws SQLException {
public ConnectionWrapper initAndReleaseWithAuroraHostListPlugin() throws SQLException {
try (ConnectionWrapper wrapper = new ConnectionWrapper(
useExecutionPlugin(),
useAuroraHostListPlugin(),
CONNECTION_STRING,
mockConnectionProvider)) {
wrapper.releaseResources();
Expand All @@ -135,9 +135,9 @@ public ConnectionWrapper initAndReleaseWithExecutionTimePlugin() throws SQLExcep
}

@Benchmark
public ConnectionWrapper initAndReleaseWithAuroraHostListPlugin() throws SQLException {
public ConnectionWrapper initAndReleaseWithExecutionTimeAndAuroraHostListPlugins() throws SQLException {
try (ConnectionWrapper wrapper = new ConnectionWrapper(
useAuroraHostList(),
useExecutionTimeAndAuroraHostListPlugins(),
CONNECTION_STRING,
mockConnectionProvider)) {
wrapper.releaseResources();
Expand Down Expand Up @@ -196,7 +196,7 @@ public ConnectionWrapper initAndReleaseWithReadWriteSplittingPluginWithReaderLoa
@Benchmark
public Statement executeStatementBaseline() throws SQLException {
try (ConnectionWrapper wrapper = new ConnectionWrapper(
useExecutionPlugin(),
useExecutionTimePlugin(),
CONNECTION_STRING,
mockConnectionProvider);
Statement statement = wrapper.createStatement()) {
Expand All @@ -208,7 +208,7 @@ public Statement executeStatementBaseline() throws SQLException {
public ResultSet executeStatementWithExecutionTimePlugin() throws SQLException {
try (
ConnectionWrapper wrapper = new ConnectionWrapper(
useExecutionPlugin(),
useExecutionTimePlugin(),
CONNECTION_STRING,
mockConnectionProvider);
Statement statement = wrapper.createStatement();
Expand All @@ -217,21 +217,21 @@ public ResultSet executeStatementWithExecutionTimePlugin() throws SQLException {
}
}

Properties useAllPlugins() {
Properties useExecutionTimePlugin() {
final Properties properties = new Properties();
properties.setProperty("wrapperPlugins", "executionTime,auroraHostList");
properties.setProperty("wrapperPlugins", "executionTime");
return properties;
}

Properties useExecutionPlugin() {
Properties useAuroraHostListPlugin() {
final Properties properties = new Properties();
properties.setProperty("wrapperPlugins", "executionTime");
properties.setProperty("wrapperPlugins", "auroraHostList");
return properties;
}

Properties useAuroraHostList() {
Properties useExecutionTimeAndAuroraHostListPlugins() {
final Properties properties = new Properties();
properties.setProperty("wrapperPlugins", "auroraHostList");
properties.setProperty("wrapperPlugins", "executionTime,auroraHostList");
return properties;
}

Expand Down
2 changes: 1 addition & 1 deletion docs/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- [Architecture](./development-guide/Architecture.md)
- [Plugin Manager](./development-guide/PluginManager.md)
- [Loadable Plugins](./development-guide/LoadablePlugins.md)
- [EFM and Failover Plugin Performance Results](./development-guide/EFMAndFailoverPluginPerformanceResults.md)
- [Plugin Pipeline Performance Results](./development-guide/PluginPipelinePerformanceResults.md)
- [Read-Write Splitting Plugin Performance Results](./development-guide/ReadWriteSplittingPluginPerformanceResults.md)
- [Plugin Service](./development-guide/PluginService.md)
- [Pipelines](./development-guide/Pipelines.md)
21 changes: 11 additions & 10 deletions docs/development-guide/DevelopmentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ gradlew build

The AWS JDBC Driver uses the following tests to verify its correctness and performance on both JVM and GraalVM:

| Tests | Description |
| --------------------------------------------- | ------------------------------------------------------------ |
| Unit tests | Tests for AWS JDBC Driver correctness. |
| Failover integration tests | Driver-specific tests for different reader and writer failover workflows using the Failover Connection Plugin. |
| Enhanced failure monitoring integration tests | Driver-specific tests for the enhanced failure monitoring functionality using the Host Monitoring Connection Plugin. |
| AWS authentication integration tests | Driver-specific tests for AWS authentication methods with the AWS Secrets Manager Plugin or the AWS IAM Authentication Plugin. |
| Tests | Description |
|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| Unit tests | Tests for AWS JDBC Driver correctness. |
| Failover integration tests | Driver-specific tests for different reader and writer failover workflows using the Failover Connection Plugin. |
| Enhanced failure monitoring integration tests | Driver-specific tests for the enhanced failure monitoring functionality using the Host Monitoring Connection Plugin. |
| AWS authentication integration tests | Driver-specific tests for AWS authentication methods with the AWS Secrets Manager Plugin or the AWS IAM Authentication Plugin. |
| Connection plugin manager benchmarks | The [benchmarks](../../benchmarks/README.md) subproject measures the overhead from executing JDBC method calls with multiple connection plugins enabled. |

### Extra Integration Tests
Expand Down Expand Up @@ -76,8 +76,9 @@ These benchmarks do not make actual connections to the databases and use simple
The goal of these benchmarks is to measure the overhead of using the AWS JDBC Driver with multiple plugins enabled.
![](../images/jdbc_wrapper_connect_execute_pipelines_benchmarks.png)
![](../images/jdbc_wrapper_pipelines_benchmarks.png)
![](../images/jdbc_wrapper_init_release_pipelines_benchmarks.png)

See [here](EFMAndFailoverPluginPerformanceResults.md#benchmarks) for a more detailed performance breakdown.
See [here](PluginPipelinePerformanceResults.md#benchmarks) for a more detailed performance breakdown.

#### Failover-specific Performance Tests
The diagrams in this section show the AWS JDBC Driver's failure detection performance with or without the Failover Connection Plugin under different settings.
Expand All @@ -92,7 +93,7 @@ Varying values for the network outage delay are tested, represented on the X axi

This diagram shows the failover time with a 30-seconds socket timeout and different network outage delays.
![](../images/jdbc_wrapper_postgresql_failover_with_30s_socket_timeout.png)
See [here](EFMAndFailoverPluginPerformanceResults.md#failover-performance-with-30-seconds-socket-timeout-configuration) for a more detailed performance breakdown.
See [here](PluginPipelinePerformanceResults.md#failover-performance-with-30-seconds-socket-timeout-configuration) for a more detailed performance breakdown.

The following diagrams show how the AWS JDBC Driver performs under a more common failure detection setting versus a more aggressive setting.

Expand All @@ -118,11 +119,11 @@ For more details on failure detection settings, see [here](../using-the-jdbc-dri
For more details on failover settings, see [here](../using-the-jdbc-driver/FailoverConfigurationGuide.md).
![](../images/jdbc_wrapper_postgresql_failover_efm_30000_5000_3.png)
![](../images/jdbc_wrapper_postgresql_failover_efm_6000_1000_1.png)
See [here](EFMAndFailoverPluginPerformanceResults.md#failover-performance-with-different-enhanced-failure-monitoring-configuration) for a more detailed performance breakdown.
See [here](PluginPipelinePerformanceResults.md#failover-performance-with-different-enhanced-failure-monitoring-configuration) for a more detailed performance breakdown.

![](../images/jdbc_wrapper_postgresql_efm_30000_5000_3.png)
![](../images/jdbc_wrapper_postgresql_efm_6000_1000_1.png)
See [here](EFMAndFailoverPluginPerformanceResults.md#enhanced-failure-monitoring-performance-with-different-failure-detection-configuration) for a more detailed performance breakdown.
See [here](PluginPipelinePerformanceResults.md#enhanced-failure-monitoring-performance-with-different-failure-detection-configuration) for a more detailed performance breakdown.

#### Read-Write Splitting and Reader Load Balancing Performance Tests

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EFM and Failover Plugin Performance Results
# Plugin Pipeline Performance Results

## Benchmarks
| Benchmark | Score | Error | Units |
Expand Down Expand Up @@ -32,14 +32,18 @@
| releaseResourcesWithNoPlugins | 8.030 | 3.776 | us/op |
| releaseResourcesTenGenericPlugins | 15.243 | 4.906 | us/op |

| Benchmark | Score | Error | Units |
|-----------------------------------------------------------|----------|---------|-------|
| executeStatementBaseline | 706.629 | 139.833 | us/op |
| executeStatementWithExecutionTimePlugin | 1037.951 | 187.424 | us/op |
| initAndReleaseBaseLine | 0.667 | 0.140 | us/op |
| initAndReleaseWithAllPlugins | 668.783 | 118.127 | us/op |
| initAndReleaseWithAuroraHostListPlugin | 667.868 | 122.335 | us/op |
| initAndReleaseWithExecutionTimePlugin | 679.230 | 136.899 | us/op |
| Benchmark | Score | Error | Units |
|------------------------------------------------------------------------------------|----------|---------|-------|
| executeStatementBaseline | 912.928 | 137.285 | us/op |
| executeStatementWithExecutionTimePlugin | 1739.314 | 286.132 | us/op |
| initAndReleaseBaseLine | 1.132 | 1.123 | us/op |
| initAndReleaseWithAuroraHostListAndReadWriteSplittingPlugin | 1562.297 | 245.078 | us/op |
| initAndReleaseWithAuroraHostListAndReadWriteSplittingPluginWithReaderLoadBalancing | 1519.943 | 243.188 | us/op |
| initAndReleaseWithAuroraHostListPlugin | 964.033 | 149.767 | us/op |
| initAndReleaseWithExecutionTimeAndAuroraHostListPlugins | 1005.531 | 165.567 | us/op |
| initAndReleaseWithExecutionTimePlugin | 804.334 | 150.357 | us/op |
| initAndReleaseWithReadWriteSplittingPlugin | 870.167 | 158.707 | us/op |
| initAndReleaseWithReadWriteSplittingPluginWithReaderLoadBalancing | 867.317 | 149.344 | us/op |

## Performance Tests

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.