mirror of
https://github.com/sogou/workflow.git
synced 2026-10-29 03:27:04 +08:00
Merge branch 'master' of https://github.com/sogou/workflow
This commit is contained in:
@@ -180,7 +180,7 @@ struct AddressParams
|
||||
大多数参数的作用一眼了然。其中endpoint_params和dns相关参数,可以覆盖全局的配置。
|
||||
例如,全局对每个目标ip最大连接数为200,但我想为10.135.35.53设置最多1000连接数,可以这么做:
|
||||
~~~cpp
|
||||
UpstreamManager::upstream_create_weigthed_random("10.135.35.53", false);
|
||||
UpstreamManager::upstream_create_weighted_random("10.135.35.53", false);
|
||||
struct AddressParams params = ADDRESS_PARAMS_DEFAULT;
|
||||
params.endpoint_params.max_connections = 1000;
|
||||
UpstreamManager::upstream_add_server("10.135.35.53", "10.135.35.53", ¶ms);
|
||||
|
||||
@@ -195,7 +195,7 @@ Most of the parameters are self-explanatory. Among these parameters, endpoint\_p
|
||||
For example, if the global maximum number of connections to each target IP is 200, but you want to set a maximum of 1000 connections for 10.135.35.53, please follow the instructions below:
|
||||
|
||||
~~~cpp
|
||||
UpstreamManager::upstream_create_weigthed_random("10.135.35.53", false);
|
||||
UpstreamManager::upstream_create_weighted_random("10.135.35.53", false);
|
||||
struct AddressParams params = ADDRESS_PARAMS_DEFAULT;
|
||||
params.endpoint_params.max_connections = 1000;
|
||||
UpstreamManager::upstream_add_server("10.135.35.53", "10.135.35.53", ¶ms);
|
||||
|
||||
@@ -278,7 +278,7 @@ void WFComplexClientTask<REQ, RESP, CTX>::init(TransportType type,
|
||||
if (redirect_)
|
||||
clear_prev_state();
|
||||
|
||||
const auto params = WFGlobal::get_global_settings()->endpoint_params;
|
||||
auto params = WFGlobal::get_global_settings()->endpoint_params;
|
||||
struct addrinfo addrinfo = { };
|
||||
addrinfo.ai_family = addr->sa_family;
|
||||
addrinfo.ai_socktype = SOCK_STREAM;
|
||||
|
||||
Reference in New Issue
Block a user