Tatsuhiro Tsujikawa
a2afd393ed
nghttpx: Remove field from LogSpec which can be got from Downstream
2017-01-11 22:30:12 +09:00
Tatsuhiro Tsujikawa
33aa327ef5
nghttpx: Fix access.log timestamp
...
access.log timestamp is now when request header fields are received,
rather than when access log is written.
2017-01-11 20:47:17 +09:00
Tatsuhiro Tsujikawa
4fa150c494
nghttpx: Use Memchunk based read buffer for frontend connection
...
Previously, we have dedicated read buffer for each frontend
connection. With this commit, the buffer spaces are only used when
needed, and pooled if they are not used. This reduces memory usage
for idle client connections.
2017-01-08 23:20:14 +09:00
Tatsuhiro Tsujikawa
b313386988
nghttpx: Add proxyproto to frontend option to accept PROXY protocol
...
Previously, global accept-proxy-protocol option enables PROXY protocol
support for all frontend listeners, but this was inflexible. To fix
this issue, accept-proxy-protocol option is now deprecated, and
instead proxyproto parameter in frontend option enables PROXY protocol
support per frontend.
2017-01-03 12:47:03 +09:00
Tatsuhiro Tsujikawa
359730af54
Fix regression in ff64f64e1d
2016-12-21 23:19:10 +09:00
Tatsuhiro Tsujikawa
ff64f64e1d
nghttpx: Faster HTTP/1 frontend
2016-11-29 20:42:27 +09:00
Tatsuhiro Tsujikawa
46d1e6bb55
nghttpx: Increase block size of connection wide allocator to 512
2016-10-24 21:06:37 +09:00
Tatsuhiro Tsujikawa
1b4ccd0d51
nghttpx: Don't call get_config() repeatedly
2016-10-08 11:37:18 +09:00
Tatsuhiro Tsujikawa
8c1e155f44
nghttpx: Make it simple to calculate length
2016-10-03 22:09:46 +09:00
Tatsuhiro Tsujikawa
99a91e3172
nghttpx: Add BlockAllocator to Config object
2016-10-03 22:09:45 +09:00
Tatsuhiro Tsujikawa
ede6104900
nghttpx: Increase block size for connection wide BlockAllocator
2016-10-02 22:28:43 +09:00
Tatsuhiro Tsujikawa
e1a865c406
nghttpx: Add BlockAllocator version of util::formax_hex
2016-10-02 22:28:42 +09:00
Tatsuhiro Tsujikawa
8a9810ed32
nghttpx: Add BlockAllocator to ClientHandler
2016-10-01 22:54:17 +09:00
Tatsuhiro Tsujikawa
69b53b9aaa
nghttpx: Handle graceful shutdown with client IP affinity enabled
2016-09-22 23:17:49 +09:00
Tatsuhiro Tsujikawa
f267e400fa
nghttpx: Migrate backend stream to another h2 session on graceful shutdown
2016-09-15 00:53:41 +09:00
Tatsuhiro Tsujikawa
bc31146c1f
nghttpx: Add tls_sni to mruby Nghttpx::Env class
...
tls_sni returns TLS SNI value which client sent in this TLS
connection.
2016-09-10 22:08:34 +09:00
Tatsuhiro Tsujikawa
27b250ac8e
nghttpx: Add experimental TCP optimization for h2 frontend
2016-09-10 16:27:48 +09:00
Tatsuhiro Tsujikawa
ad3d43b8be
nghttpx: Add access log variable for backend host and port
...
Use $backend_host and $backend_port. $backend_host is backend host
name given in --backend option. It could be a path to UNIX domain
socket.
2016-08-05 00:04:47 +09:00
Tatsuhiro Tsujikawa
30f26a2b9d
nghttpx: Explicitly cast to uint32_t for hash calculation
2016-07-06 23:58:53 +09:00
Tatsuhiro Tsujikawa
2bbe4422d2
nghttpx: Use consistent hashing for client IP based session affinity
...
We use technique described in https://github.com/RJ/ketama
2016-07-06 23:31:10 +09:00
Tatsuhiro Tsujikawa
cbced219ec
nghttpx: Rewrite read timer handling
...
For HTTP/2, read timer starts when there is no downstream, and timer
stops when there is at least one downstream. For HTTP/1, read timer
starts when request handling finished, and timer stops when request
handling starts.
2016-06-24 00:04:39 +09:00
Tatsuhiro Tsujikawa
56e7cd4be2
nghttpx: Add healthmon parameter to -f option to enable health monitor mode
2016-06-17 00:00:37 +09:00
Tatsuhiro Tsujikawa
af9662f971
nghttpx: Make API processing one of alternative mode
2016-06-16 23:30:35 +09:00
Tatsuhiro Tsujikawa
c06e8c89ff
nghttpx: Use BlockAllocator in match_downstream_addr_group
2016-06-11 18:41:43 +09:00
Tatsuhiro Tsujikawa
a809da68a3
nghttpx: Aggregate router configuration into one struct
2016-06-11 18:25:38 +09:00
Tatsuhiro Tsujikawa
288449b9bc
nghttpx: Rewrite wildcard router
2016-06-10 23:43:44 +09:00
Tatsuhiro Tsujikawa
f9897f8ccd
nghttpx: Fix bugs and crash when affinity is enabled
2016-06-09 23:17:41 +09:00
Tatsuhiro Tsujikawa
143d0b69b7
nghttpx: Implement client IP based session affinity
2016-06-09 22:35:59 +09:00
Tatsuhiro Tsujikawa
845aa7a710
nghttpx: Share downstream config object
...
This is the unit of sharing configurations to change
2016-06-03 19:57:43 +09:00
Tatsuhiro Tsujikawa
fe58614b23
nghttpx: Use std::shared_ptr for downstream addresses so that we can swap them
2016-06-03 01:20:49 +09:00
Tatsuhiro Tsujikawa
667c8b0e27
nghttpx: Add APIDownstreamConnection to handle API request
...
For those connections via frontend with api parameter, they use solely
APIDownstreamConnection.
In this commit, APIDownstreamConnection just consumes all request
body, and do nothing. The next few commits implements our first API
endpoint: /v1/api/dynamicconfig.
2016-06-02 23:50:56 +09:00
Tatsuhiro Tsujikawa
26eb983cf0
nghttpx: Fix bug that h2 is used while there is no h2 backend
2016-05-26 00:14:11 +09:00
Tatsuhiro Tsujikawa
e0491c2ee8
nghttpx: Refactor protocol selection in backend
2016-05-25 23:07:04 +09:00
Tatsuhiro Tsujikawa
2a4bf9f615
nghttpx: Allow mixed protocol and TLS settings among backends under same pattern
2016-05-24 23:36:43 +09:00
Tatsuhiro Tsujikawa
09b97a3313
nghttpx: Add mruby env.server_port to return frontend server side port
2016-04-28 00:19:30 +09:00
Tatsuhiro Tsujikawa
3d00dd6537
nghttpx: Fix erroneous division by sizeof(...)
2016-04-24 17:42:24 +09:00
Tatsuhiro Tsujikawa
2a59c832c1
nghttpx: Set 0 to next_proto_len explicitly for clarification
2016-04-08 23:03:42 +09:00
Tatsuhiro Tsujikawa
46514074a4
nghttpx: Better load balancing between backend HTTP/2 servers
2016-04-03 15:09:01 +09:00
Tatsuhiro Tsujikawa
344541dd89
nghttpx: Better distribute load to backend h2 servers
2016-04-02 00:02:48 +09:00
Tatsuhiro Tsujikawa
186d440168
nghttpx: More StringRef-fy
2016-03-25 01:19:42 +09:00
Tatsuhiro Tsujikawa
0875e66aab
src: Remove streq(const char *) overload
2016-03-25 00:02:07 +09:00
Tatsuhiro Tsujikawa
58b06f32a2
nghttpx: Configure TLS per backend routing pattern
...
We added "tls" parameter to --backend option to enable TLS on that
backend connection. --backend-tls options was deprecated, now is
noop.
2016-03-23 22:56:18 +09:00
Tatsuhiro Tsujikawa
0f9ed40bd9
nghttpx: Share connection among different patterns if address set are same
2016-03-23 00:01:27 +09:00
Tatsuhiro Tsujikawa
a1e0bd134e
nghttpx: Create at least the same number of h2 session as load balancing hosts
2016-03-19 12:00:27 +09:00
Tatsuhiro Tsujikawa
34d209b30b
nghttpx: Add wildcard host routing
...
This change allows host pattern in --backend to include '*' to
indicate wildcard match. The wildcard match is made in suffix match
only.
2016-03-13 01:01:34 +09:00
Tatsuhiro Tsujikawa
b1b57cc740
nghttpx: Use StringRef for authority, scheme and path
2016-03-12 21:12:26 +09:00
Tatsuhiro Tsujikawa
fe6ccd16da
nghttpx: Change read timeout reset timing
2016-03-05 19:11:36 +09:00
Tatsuhiro Tsujikawa
284691253f
nghttpx: Use StringRef for http::create_forwarded parameter
2016-02-29 00:05:32 +09:00
Tatsuhiro Tsujikawa
06921f35f3
nghttpx: Restructure mode settings
...
It is very hard to support multiple protocols in backend while
retaining multiple mode settings. Therefore, we dropped modes except
for default and HTTP/2 proxy mode. The other removed modes can be
emulated using combinations of options. Now the backend connection is
not encrypted by default. To enable encryption on backend connection,
use --backend-tls option.
2016-02-28 21:35:26 +09:00
Tatsuhiro Tsujikawa
1832f78684
nghttpx: Move downstream proto to DownstreamAddrGroup
2016-02-28 16:56:14 +09:00