nghttpx: Deprecate backend-http1-connections-per-frontend in favor of backend-connections-per-frontend
This commit is contained in:
parent
1832f78684
commit
44d3801760
|
@ -124,7 +124,8 @@ OPTIONS = [
|
||||||
"tls-ticket-key-memcached-address-family",
|
"tls-ticket-key-memcached-address-family",
|
||||||
"backend-address-family",
|
"backend-address-family",
|
||||||
"frontend-http2-max-concurrent-streams",
|
"frontend-http2-max-concurrent-streams",
|
||||||
"backend-http2-max-concurrent-streams"
|
"backend-http2-max-concurrent-streams",
|
||||||
|
"backend-connections-per-frontend"
|
||||||
]
|
]
|
||||||
|
|
||||||
LOGVARS = [
|
LOGVARS = [
|
||||||
|
|
20
src/shrpx.cc
20
src/shrpx.cc
|
@ -1362,12 +1362,13 @@ Performance:
|
||||||
--backend-http1-connections-per-frontend.
|
--backend-http1-connections-per-frontend.
|
||||||
Default: )" << get_config()->conn.downstream.connections_per_host
|
Default: )" << get_config()->conn.downstream.connections_per_host
|
||||||
<< R"(
|
<< R"(
|
||||||
--backend-http1-connections-per-frontend=<N>
|
--backend-connections-per-frontend=<N>
|
||||||
Set maximum number of backend concurrent HTTP/1
|
Set maximum number of backend concurrent connections (or
|
||||||
connections per frontend. This option is only used for
|
streams in case of HTTP/2) per frontend. This option is
|
||||||
default mode. 0 means unlimited. To limit the number
|
only used for default mode. 0 means unlimited. To
|
||||||
of connections per host for HTTP/2 or SPDY proxy mode
|
limit the number of connections per host for HTTP/2 or
|
||||||
(-s option), use --backend-http1-connections-per-host.
|
SPDY proxy mode (-s option), use
|
||||||
|
--backend-http1-connections-per-host.
|
||||||
Default: )"
|
Default: )"
|
||||||
<< get_config()->conn.downstream.connections_per_frontend << R"(
|
<< get_config()->conn.downstream.connections_per_frontend << R"(
|
||||||
--rlimit-nofile=<N>
|
--rlimit-nofile=<N>
|
||||||
|
@ -2473,6 +2474,8 @@ int main(int argc, char **argv) {
|
||||||
&flag, 117},
|
&flag, 117},
|
||||||
{SHRPX_OPT_BACKEND_HTTP2_MAX_CONCURRENT_STREAMS, required_argument,
|
{SHRPX_OPT_BACKEND_HTTP2_MAX_CONCURRENT_STREAMS, required_argument,
|
||||||
&flag, 118},
|
&flag, 118},
|
||||||
|
{SHRPX_OPT_BACKEND_CONNECTIONS_PER_FRONTEND, required_argument, &flag,
|
||||||
|
119},
|
||||||
{nullptr, 0, nullptr, 0}};
|
{nullptr, 0, nullptr, 0}};
|
||||||
|
|
||||||
int option_index = 0;
|
int option_index = 0;
|
||||||
|
@ -2978,6 +2981,11 @@ int main(int argc, char **argv) {
|
||||||
cmdcfgs.emplace_back(SHRPX_OPT_BACKEND_HTTP2_MAX_CONCURRENT_STREAMS,
|
cmdcfgs.emplace_back(SHRPX_OPT_BACKEND_HTTP2_MAX_CONCURRENT_STREAMS,
|
||||||
optarg);
|
optarg);
|
||||||
break;
|
break;
|
||||||
|
case 119:
|
||||||
|
// --backend-connections-per-frontend
|
||||||
|
cmdcfgs.emplace_back(SHRPX_OPT_BACKEND_CONNECTIONS_PER_FRONTEND,
|
||||||
|
optarg);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -654,6 +654,7 @@ enum {
|
||||||
SHRPX_OPTID_ALTSVC,
|
SHRPX_OPTID_ALTSVC,
|
||||||
SHRPX_OPTID_BACKEND,
|
SHRPX_OPTID_BACKEND,
|
||||||
SHRPX_OPTID_BACKEND_ADDRESS_FAMILY,
|
SHRPX_OPTID_BACKEND_ADDRESS_FAMILY,
|
||||||
|
SHRPX_OPTID_BACKEND_CONNECTIONS_PER_FRONTEND,
|
||||||
SHRPX_OPTID_BACKEND_HTTP_PROXY_URI,
|
SHRPX_OPTID_BACKEND_HTTP_PROXY_URI,
|
||||||
SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_FRONTEND,
|
SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_FRONTEND,
|
||||||
SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_HOST,
|
SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_HOST,
|
||||||
|
@ -1344,6 +1345,15 @@ int option_lookup_token(const char *name, size_t namelen) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 32:
|
||||||
|
switch (name[31]) {
|
||||||
|
case 'd':
|
||||||
|
if (util::strieq_l("backend-connections-per-fronten", name, 31)) {
|
||||||
|
return SHRPX_OPTID_BACKEND_CONNECTIONS_PER_FRONTEND;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 33:
|
case 33:
|
||||||
switch (name[32]) {
|
switch (name[32]) {
|
||||||
case 'l':
|
case 'l':
|
||||||
|
@ -2045,6 +2055,10 @@ int parse_config(const char *opt, const char *optarg,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_FRONTEND:
|
case SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_FRONTEND:
|
||||||
|
LOG(WARN) << opt << ": deprecated. Use "
|
||||||
|
<< SHRPX_OPT_BACKEND_CONNECTIONS_PER_FRONTEND << " instead.";
|
||||||
|
// fall through
|
||||||
|
case SHRPX_OPTID_BACKEND_CONNECTIONS_PER_FRONTEND:
|
||||||
return parse_uint(&mod_config()->conn.downstream.connections_per_frontend,
|
return parse_uint(&mod_config()->conn.downstream.connections_per_frontend,
|
||||||
opt, optarg);
|
opt, optarg);
|
||||||
case SHRPX_OPTID_LISTENER_DISABLE_TIMEOUT:
|
case SHRPX_OPTID_LISTENER_DISABLE_TIMEOUT:
|
||||||
|
|
|
@ -232,6 +232,8 @@ constexpr char SHRPX_OPT_FRONTEND_HTTP2_MAX_CONCURRENT_STREAMS[] =
|
||||||
"frontend-http2-max-concurrent-streams";
|
"frontend-http2-max-concurrent-streams";
|
||||||
constexpr char SHRPX_OPT_BACKEND_HTTP2_MAX_CONCURRENT_STREAMS[] =
|
constexpr char SHRPX_OPT_BACKEND_HTTP2_MAX_CONCURRENT_STREAMS[] =
|
||||||
"backend-http2-max-concurrent-streams";
|
"backend-http2-max-concurrent-streams";
|
||||||
|
constexpr char SHRPX_OPT_BACKEND_CONNECTIONS_PER_FRONTEND[] =
|
||||||
|
"backend-connections-per-frontend";
|
||||||
|
|
||||||
constexpr size_t SHRPX_OBFUSCATED_NODE_LENGTH = 8;
|
constexpr size_t SHRPX_OBFUSCATED_NODE_LENGTH = 8;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue