记得上下班打卡 | git大法好,push需谨慎

Commit 0b4df6ac authored by anjiabin's avatar anjiabin

修改rest请求并发数

parent 333714d1
...@@ -31,9 +31,9 @@ public class RestTemplateConfig { ...@@ -31,9 +31,9 @@ public class RestTemplateConfig {
PoolingHttpClientConnectionManager poolConnManager = PoolingHttpClientConnectionManager poolConnManager =
new PoolingHttpClientConnectionManager(20, TimeUnit.SECONDS); new PoolingHttpClientConnectionManager(20, TimeUnit.SECONDS);
// 设置最大链接数 // 设置最大链接数
poolConnManager.setMaxTotal(2000 * getMaxCpuCore() + 1000); poolConnManager.setMaxTotal(5000 * getMaxCpuCore() * 5);
// 单路由的并发数 // 单路由的并发数
poolConnManager.setDefaultMaxPerRoute(1000 * getMaxCpuCore()); poolConnManager.setDefaultMaxPerRoute(5000 * getMaxCpuCore());
HttpClientBuilder httpClientBuilder = HttpClients.custom(); HttpClientBuilder httpClientBuilder = HttpClients.custom();
httpClientBuilder.setConnectionManager(poolConnManager); httpClientBuilder.setConnectionManager(poolConnManager);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment