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

Commit 1847bbeb authored by anjiabin's avatar anjiabin

修改goblin rest请求连接池配置

parent ae155150
...@@ -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(500 * getMaxCpuCore() + 500); poolConnManager.setMaxTotal(100000 * getMaxCpuCore());
// 单路由的并发数 // 单路由的并发数
poolConnManager.setDefaultMaxPerRoute(500 * getMaxCpuCore()); poolConnManager.setDefaultMaxPerRoute(25000 * 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