Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
2326337d
Commit
2326337d
authored
Feb 28, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Deprecate backend-http1-connections-per-host in favor of backend-connections-per-host
parent
06921f35
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
15 deletions
+34
-15
gennghttpxfun.py
gennghttpxfun.py
+2
-1
src/shrpx.cc
src/shrpx.cc
+19
-13
src/shrpx_config.cc
src/shrpx_config.cc
+11
-1
src/shrpx_config.h
src/shrpx_config.h
+2
-0
No files found.
gennghttpxfun.py
View file @
2326337d
...
...
@@ -126,7 +126,8 @@ OPTIONS = [
"frontend-http2-max-concurrent-streams"
,
"backend-http2-max-concurrent-streams"
,
"backend-connections-per-frontend"
,
"backend-tls"
"backend-tls"
,
"backend-connections-per-host"
]
LOGVARS
=
[
...
...
src/shrpx.cc
View file @
2326337d
...
...
@@ -1356,23 +1356,24 @@ Performance:
accepts. Setting 0 means unlimited.
Default: )"
<<
get_config
()
->
conn
.
upstream
.
worker_connections
<<
R"(
--backend-http1-connections-per-host=<N>
Set maximum number of backend concurrent HTTP/1
connections per origin host. This option is meaningful
when --http2-proxy option is used. The origin host is
determined by authority portion of request URI (or
:authority header field for HTTP/2). To limit the
number of connections per frontend for default mode, use
--backend-connections-per-host=<N>
Set maximum number of backend concurrent connections
(and/or streams in case of HTTP/2) per origin host.
This option is meaningful when --http2-proxy option is
used. The origin host is determined by authority
portion of request URI (or :authority header field for
HTTP/2). To limit the number of connections per
frontend for default mode, use
--backend-connections-per-frontend.
Default: )"
<<
get_config
()
->
conn
.
downstream
.
connections_per_host
<<
R"(
--backend-connections-per-frontend=<N>
Set
maximum number of backend concurrent connections (or
streams in case of HTTP/2) per frontend. This option
is
o
nly used for default mode. 0 means unlimited. To
limit the number of connections per host with
--http2-proxy option,
use
--backend-
http1-
connections-per-host.
Set
maximum number of backend concurrent connections
(and/or streams in case of HTTP/2) per frontend. Th
is
o
ption is only used for default mode. 0 means
unlimited. To limit the number of connections per host
with --http2-proxy option,
use
--backend-connections-per-host.
Default: )"
<<
get_config
()
->
conn
.
downstream
.
connections_per_frontend
<<
R"(
--rlimit-nofile=<N>
...
...
@@ -2440,6 +2441,7 @@ int main(int argc, char **argv) {
{
SHRPX_OPT_BACKEND_CONNECTIONS_PER_FRONTEND
,
required_argument
,
&
flag
,
119
},
{
SHRPX_OPT_BACKEND_TLS
,
no_argument
,
&
flag
,
120
},
{
SHRPX_OPT_BACKEND_CONNECTIONS_PER_HOST
,
required_argument
,
&
flag
,
121
},
{
nullptr
,
0
,
nullptr
,
0
}};
int
option_index
=
0
;
...
...
@@ -2954,6 +2956,10 @@ int main(int argc, char **argv) {
// --backend-tls
cmdcfgs
.
emplace_back
(
SHRPX_OPT_BACKEND_TLS
,
"yes"
);
break
;
case
121
:
// --backend-connections-per-host
cmdcfgs
.
emplace_back
(
SHRPX_OPT_BACKEND_CONNECTIONS_PER_HOST
,
optarg
);
break
;
default:
break
;
}
...
...
src/shrpx_config.cc
View file @
2326337d
...
...
@@ -694,6 +694,7 @@ enum {
SHRPX_OPTID_BACKEND
,
SHRPX_OPTID_BACKEND_ADDRESS_FAMILY
,
SHRPX_OPTID_BACKEND_CONNECTIONS_PER_FRONTEND
,
SHRPX_OPTID_BACKEND_CONNECTIONS_PER_HOST
,
SHRPX_OPTID_BACKEND_HTTP_PROXY_URI
,
SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_FRONTEND
,
SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_HOST
,
...
...
@@ -1370,6 +1371,11 @@ int option_lookup_token(const char *name, size_t namelen) {
return
SHRPX_OPTID_TLS_TICKET_KEY_MEMCACHED_TLS
;
}
break
;
case
't'
:
if
(
util
::
strieq_l
(
"backend-connections-per-hos"
,
name
,
27
))
{
return
SHRPX_OPTID_BACKEND_CONNECTIONS_PER_HOST
;
}
break
;
}
break
;
case
30
:
...
...
@@ -2082,7 +2088,11 @@ int parse_config(const char *opt, const char *optarg,
"--host-rewrite option."
;
return
0
;
case
SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_HOST
:
{
case
SHRPX_OPTID_BACKEND_HTTP1_CONNECTIONS_PER_HOST
:
LOG
(
WARN
)
<<
opt
<<
": deprecated. Use backend-connections-per-host instead."
;
// fall through
case
SHRPX_OPTID_BACKEND_CONNECTIONS_PER_HOST
:
{
int
n
;
if
(
parse_uint
(
&
n
,
opt
,
optarg
)
!=
0
)
{
...
...
src/shrpx_config.h
View file @
2326337d
...
...
@@ -235,6 +235,8 @@ constexpr char SHRPX_OPT_BACKEND_HTTP2_MAX_CONCURRENT_STREAMS[] =
constexpr
char
SHRPX_OPT_BACKEND_CONNECTIONS_PER_FRONTEND
[]
=
"backend-connections-per-frontend"
;
constexpr
char
SHRPX_OPT_BACKEND_TLS
[]
=
"backend-tls"
;
constexpr
char
SHRPX_OPT_BACKEND_CONNECTIONS_PER_HOST
[]
=
"backend-connections-per-host"
;
constexpr
size_t
SHRPX_OBFUSCATED_NODE_LENGTH
=
8
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment