Skip to content

Commit

Permalink
Increase max connections per route to 20.
Browse files Browse the repository at this point in the history
Updated PoolingHttpClientConnectionManager across several classes to increase the default maximum connections per route from 5 to 20. This change aims to enhance resource handling efficiency and improve overall application performance during high traffic scenarios.
  • Loading branch information
Gcolon021 committed Nov 4, 2024
1 parent 5d3748c commit 3b7c608
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public AggregateDataSharingResourceRS(ApplicationProperties applicationPropertie

PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager();
connectionManager.setMaxTotal(100); // Maximum total connections
connectionManager.setDefaultMaxPerRoute(5); // Maximum connections per route
connectionManager.setDefaultMaxPerRoute(20); // Maximum connections per route
httpClientUtil = HttpClientUtil.getInstance(connectionManager);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public PoolingHttpClientConnectionManager getConnectionManager() {
PoolingHttpClientConnectionManager connectionManager;
connectionManager = new PoolingHttpClientConnectionManager();
connectionManager.setMaxTotal(100); // Maximum total connections
connectionManager.setDefaultMaxPerRoute(5); // Maximum connections per route
connectionManager.setDefaultMaxPerRoute(20); // Maximum connections per route
return connectionManager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public ProxyWebClient() {

connectionManager = new PoolingHttpClientConnectionManager();
connectionManager.setMaxTotal(100); // Maximum total connections
connectionManager.setDefaultMaxPerRoute(5); // Maximum connections per route
connectionManager.setDefaultMaxPerRoute(20); // Maximum connections per route

client = HttpClientUtil.getConfiguredHttpClient(connectionManager);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public ResourceWebClient() {

connectionManager = new PoolingHttpClientConnectionManager();
connectionManager.setMaxTotal(100); // Maximum total connections
connectionManager.setDefaultMaxPerRoute(5); // Maximum connections per route
connectionManager.setDefaultMaxPerRoute(20); // Maximum connections per route

this.httpClientUtil = HttpClientUtil.getInstance(connectionManager);
}
Expand Down

0 comments on commit 3b7c608

Please sign in to comment.