mirror of
https://gitee.com/openharmony/third_party_nghttp2
synced 2024-11-23 07:50:02 +00:00
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",
|
||||
"backend-address-family",
|
||||
"frontend-http2-max-concurrent-streams",
|
||||
"backend-http2-max-concurrent-streams"
|
||||
"backend-http2-max-concurrent-streams",
|
||||
"backend-connections-per-frontend"
|
||||
]
|
||||
|
||||
LOGVARS = [
|
||||
|
20
src/shrpx.cc
20
src/shrpx.cc
@ -1362,12 +1362,13 @@ Performance:
|
||||
--backend-http1-connections-per-frontend.
|
||||
Default: )" << get_config()->conn.downstream.connections_per_host
|
||||
<< R"(
|
||||
--backend-http1-connections-per-frontend=<N>
|
||||
Set maximum number of backend concurrent HTTP/1
|
||||
connections per frontend. This option is only used for
|
||||
default mode. 0 means unlimited. To limit the number
|
||||
of connections per host for HTTP/2 or SPDY proxy mode
|
||||
(-s option), use --backend-http1-connections-per-host.
|
||||
--backend-connections-per-frontend=<N>
|
||||
Set maximum number of backend concurrent connections (or
|
||||
streams in case of HTTP/2) per frontend. This option is
|
||||
only used for default mode. 0 means unlimited. To
|
||||
limit the number of connections per host for HTTP/2 or
|
||||
SPDY proxy mode (-s option), use
|
||||
--backend-http1-connections-per-host.
|
||||
Default: )"
|
||||
<< get_config()->conn.downstream.connections_per_frontend << R"(
|
||||
--rlimit-nofile=<N>
|
||||
@ -2473,6 +2474,8 @@ int main(int argc, char **argv) {
|
||||
&flag, 117},
|
||||
{SHRPX_OPT_BACKEND_HTTP2_MAX_CONCURRENT_STREAMS, required_argument,
|
||||
&flag, 118},
|
||||
{SHRPX_OPT_BACKEND_CONNECTIONS_PER_FRONTEND, required_argument, &flag,
|
||||
119},
|
||||
{nullptr, 0, nullptr, 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,
|
||||
optarg);
|
||||
break;
|
||||
case 119:
|
||||
// --backend-connections-per-frontend
|
||||
cmdcfgs.emplace_back(SHRPX_OPT_BACKEND_CONNECTIONS_PER_FRONTEND,
|
||||
optarg);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -654,6 +654,7 @@ enum {
|
||||
SHRPX_OPTID_ALTSVC,
|
||||
SHRPX_OPTID_BACKEND,
|
||||
SHRPX_OPTID_BACKEND_ADDRESS_FAMILY,
|
||||
SHRPX_OPTID_BACKEND_CONNECTIONS_PER_FRONTEND,
|
||||
SHRPX_OPTID_BACKEND_HTTP_PROXY_URI,
|
||||
SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_FRONTEND,
|
||||
SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_HOST,
|
||||
@ -1344,6 +1345,15 @@ int option_lookup_token(const char *name, size_t namelen) {
|
||||
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:
|
||||
switch (name[32]) {
|
||||
case 'l':
|
||||
@ -2045,6 +2055,10 @@ int parse_config(const char *opt, const char *optarg,
|
||||
return 0;
|
||||
}
|
||||
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,
|
||||
opt, optarg);
|
||||
case SHRPX_OPTID_LISTENER_DISABLE_TIMEOUT:
|
||||
|
@ -232,6 +232,8 @@ constexpr char SHRPX_OPT_FRONTEND_HTTP2_MAX_CONCURRENT_STREAMS[] =
|
||||
"frontend-http2-max-concurrent-streams";
|
||||
constexpr char SHRPX_OPT_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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user