Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable Hikari connection pooling #662

Closed
4 tasks done
usmansaleem opened this issue Oct 27, 2022 · 0 comments · Fixed by #669
Closed
4 tasks done

Option to disable Hikari connection pooling #662

usmansaleem opened this issue Oct 27, 2022 · 0 comments · Fixed by #669
Assignees
Labels
support TeamCerberus Under active development by TeamCerberus @Consensys

Comments

@usmansaleem
Copy link
Collaborator

usmansaleem commented Oct 27, 2022

Provide option to disable Hikari connection pooling for slashing and pruning database so that external connection pooling such as pgBouncer can be utilized.

Task

  • Create an experimental CLI flag (--Xslashing-protection-db-connection-pool-enabled)
  • Ensure JDBC properties can be specified
  • Either parse Hikari config file (datasource.*) or use separate properties file (--slashing-protection-db-pool-configuration-file and --slashing-protection-db-pool-configuration-file can be reused to specify PG Datasource properties.)
  • Ensure pgBouncer can be utilised after disabling Hikari

Results:

Block Signing Load Testing
10 keys - 10 user/sec - 10 minutes
With pgBouncer - external connection pool (defaults)

================================================================================
---- Global Information --------------------------------------------------------
> request count                                       6000 (OK=6000   KO=0     )
> min response time                                      8 (OK=8      KO=-     )
> max response time                                    136 (OK=136    KO=-     )
> mean response time                                    11 (OK=11     KO=-     )
> std deviation                                          3 (OK=3      KO=-     )
> response time 50th percentile                         11 (OK=11     KO=-     )
> response time 75th percentile                         12 (OK=12     KO=-     )
> response time 95th percentile                         14 (OK=14     KO=-     )
> response time 99th percentile                         18 (OK=18     KO=-     )
> mean requests/sec                                     10 (OK=10     KO=-     )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms                                          6000 (100%)
> 800 ms < t < 1200 ms                                   0 (  0%)
> t > 1200 ms                                            0 (  0%)
> failed                                                 0 (  0%)
================================================================================

With Hikari Internal connection pool (defaults)

================================================================================
---- Global Information --------------------------------------------------------
> request count                                       6000 (OK=6000   KO=0     )
> min response time                                      4 (OK=4      KO=-     )
> max response time                                    146 (OK=146    KO=-     )
> mean response time                                     6 (OK=6      KO=-     )
> std deviation                                          2 (OK=2      KO=-     )
> response time 50th percentile                          6 (OK=6      KO=-     )
> response time 75th percentile                          6 (OK=6      KO=-     )
> response time 95th percentile                          8 (OK=8      KO=-     )
> response time 99th percentile                         11 (OK=11     KO=-     )
> mean requests/sec                                     10 (OK=10     KO=-     )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms                                          6000 (100%)
> 800 ms < t < 1200 ms                                   0 (  0%)
> t > 1200 ms                                            0 (  0%)
> failed                                                 0 (  0%)
================================================================================

With Hikari Internal Disabled - Without PgBouncer.

================================================================================
---- Global Information --------------------------------------------------------
> request count                                       6000 (OK=6000   KO=0     )
> min response time                                     12 (OK=12     KO=-     )
> max response time                                    188 (OK=188    KO=-     )
> mean response time                                    15 (OK=15     KO=-     )
> std deviation                                          3 (OK=3      KO=-     )
> response time 50th percentile                         15 (OK=15     KO=-     )
> response time 75th percentile                         15 (OK=15     KO=-     )
> response time 95th percentile                         17 (OK=17     KO=-     )
> response time 99th percentile                         22 (OK=22     KO=-     )
> mean requests/sec                                     10 (OK=10     KO=-     )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms                                          6000 (100%)
> 800 ms < t < 1200 ms                                   0 (  0%)
> t > 1200 ms                                            0 (  0%)
> failed                                                 0 (  0%)
================================================================================
@usmansaleem usmansaleem added the TeamCerberus Under active development by TeamCerberus @Consensys label Oct 27, 2022
@usmansaleem usmansaleem self-assigned this Oct 27, 2022
@usmansaleem usmansaleem self-assigned this Oct 31, 2022
@usmansaleem usmansaleem linked a pull request Nov 8, 2022 that will close this issue
2 tasks
@iamhsk iamhsk added the support label Nov 9, 2022
usmansaleem added a commit that referenced this issue Nov 10, 2022
Introduce cli option to disable internal database connection pooling library. This can be used to use an external connection pool mechanism such as pgBouncer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support TeamCerberus Under active development by TeamCerberus @Consensys
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants