Commit Graph

2321 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa 1ad7d5e366 nghttpx: Fix compile error gcc (again) 2016-09-10 17:13:01 +09:00
Tatsuhiro Tsujikawa 456038e3de nghttpx: Fix compile error with gcc 2016-09-10 16:51:35 +09:00
Tatsuhiro Tsujikawa 9aa26970be nghttpx: Comment out TCP logging since it is too verbose 2016-09-10 16:49:15 +09:00
Tatsuhiro Tsujikawa 20c39fa843 nghttpx: Use default connection window size with window size optimization 2016-09-10 16:45:28 +09:00
Tatsuhiro Tsujikawa f5a2f1da25 nghttpx: Add --frontend-http2-window-size option, and its family
We added --frontend-http2-window-size,
--frontend-http2-connection-window-size, --backend-http2-window-size,
and --backend-http2-connection-window-size option to replace existing
*-bits options.  The old options are not flexible because they only
specify number of bits.  Now we can specify integer value, with
possible g, m, and k unit.  The old options are still available for
backend compatibility, but are deprecated.
2016-09-10 16:27:48 +09:00
Tatsuhiro Tsujikawa 27b250ac8e nghttpx: Add experimental TCP optimization for h2 frontend 2016-09-10 16:27:48 +09:00
Tatsuhiro Tsujikawa 1dabe43ff4 nghttpx: Workaround for std::make_shared bug in Xcode7, 7.1, and 7.2
std::make_shared in Xcode 7, 7.1, and 7.2 does not perform
value-initialization, and causes undefined behaviour if struct does
not have user defined default constructor.  This workaround explicitly
defines user defined default constructor, and initializes values.
2016-09-04 23:30:24 +09:00
Tatsuhiro Tsujikawa ded576f423 nghttpx: Fix bug that bytes are doubly counted for TLS connections 2016-09-04 17:28:50 +09:00
Tatsuhiro Tsujikawa 136aae725f nghttpx: Add --no-server-rewrite option not to rewrite server header field 2016-08-31 23:47:15 +09:00
Tatsuhiro Tsujikawa 99dc31ff1a nghttpx: Retry if backend h1 connection cannot be established due to timeout 2016-08-30 23:37:49 +09:00
Tatsuhiro Tsujikawa 1064e017c6 nghttpx: Reset stream if invalid header field is received in h2 2016-08-28 00:49:38 +09:00
Tatsuhiro Tsujikawa 6ba1abac6c src: Only consider openssl 1.1.0 final 2016-08-27 00:45:16 +09:00
Tatsuhiro Tsujikawa 0110d2f9f8 Fix compile error with openssl 1.1.0 2016-08-27 00:02:03 +09:00
Tatsuhiro Tsujikawa 13d3f785bd Make ImmutableString(const std::string&) explicit 2016-08-26 22:52:08 +09:00
Tatsuhiro Tsujikawa 39c068974d Make ImmutableString(const char*) explicit 2016-08-26 22:40:59 +09:00
Tatsuhiro Tsujikawa 0d4d1a63d4 nghttpx: Add --server-name option to change server response header field 2016-08-26 22:28:09 +09:00
Tatsuhiro Tsujikawa 4749e66c67 nghttpx: Disallow copying Config 2016-08-25 22:55:12 +09:00
Tatsuhiro Tsujikawa cf7f87c2ad nghttpx: Log error code from getsockopt(SO_ERROR) on first write event 2016-08-25 00:25:03 +09:00
Tatsuhiro Tsujikawa 8f47b68a95 nghttpx: Set do_signal_write_ when TLS handshake was completed 2016-08-23 21:36:43 +09:00
Tatsuhiro Tsujikawa d9139fc286 asio: Fix reserved size 2016-08-22 22:30:25 +09:00
Tatsuhiro Tsujikawa 5f65460944 nghttpx: Don't change pushed stream's priority
There is a discussion in httpbis mailing list which argues that
dependency tree is for client, and changing it in server side is not
what client expects.
https://lists.w3.org/Archives/Public/ietf-http-wg/2016JulSep/0416.html

Currently, we make pushed stream depend on the parent stream of
associated stream (that is main HTML in most of the cases), so that
associated stream and pushed stream become siblings.  In this case, we
also observed that these resources complete each other to get its
parent weight.  This means that the delivery of associated stream is
delayed by pushed streams.

So at this moment, it is not a good idea to change pushed stream
priority in a way we do currently.
2016-08-20 22:09:18 +09:00
Tatsuhiro Tsujikawa 41b2745dad nghttpx: Log backend connection failure in WARN level 2016-08-19 16:25:05 +09:00
Tatsuhiro Tsujikawa 30f9f9ef87 nghttpx: Guard with LOG_ENABLED(INFO) 2016-08-19 16:24:48 +09:00
Tatsuhiro Tsujikawa 4807e71b7d nghttpx: Fix bug that api and healthmon params do not work with http2 proxy 2016-08-18 22:31:53 +09:00
Tatsuhiro Tsujikawa b8883101d3 deflatehd: Call nghttp2_hd_deflate_change_table_size only if table size is changed from default 2016-08-18 17:19:24 +09:00
Tatsuhiro Tsujikawa 8df2c357d9 nghttp: Adjust weight according to Firefox stable 2016-08-11 21:59:34 +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 210a5c4f01 nghttpx: Use copy instead of const reference of backend group 2016-08-04 23:11:45 +09:00
Tatsuhiro Tsujikawa 54f640f3e1 nghttpx: Update doc 2016-07-31 20:50:07 +09:00
Tatsuhiro Tsujikawa e2906025c8 nghttpx: Don't exit from save_pid and set_alpn_prefs 2016-07-31 20:35:10 +09:00
Tatsuhiro Tsujikawa 9a8e9815c9 nghttpx: Cleanup 2016-07-31 20:26:03 +09:00
Tatsuhiro Tsujikawa 8c3e864989 nghttpx: Define ~Config for automatic clean up with std::unique_ptr
Now config global is backed with std::unique_ptr.  configuration
swapping dance is now a bit cleaner, but YMMV.
2016-07-31 19:01:29 +09:00
Tatsuhiro Tsujikawa 22570b7260 nghttpx: Close fd when error occurred in reload operation
This commit also fixes the bug that old configuration is still used
for worker process.  The another bug fix is that inherited, but not
used fd is not closed in worker process.  That makes reloading next
configuration fail if it contains the address which are leaked into
worker process.
2016-07-31 18:47:03 +09:00
Tatsuhiro Tsujikawa fb49182c29 nghttpx: Move original_argv, argv, argc, and cmdcfgs to StartupConfig 2016-07-31 16:34:55 +09:00
Tatsuhiro Tsujikawa b9b648e0ed nghttpx: Remove last_worker_pid from Config
The last_worker_pid is known by inspecting the last entry of
worker_processes.
2016-07-31 16:20:00 +09:00
Tatsuhiro Tsujikawa 494775a25d nghttpx: Rename SignalServer with WorkerProcess 2016-07-31 16:16:23 +09:00
Tatsuhiro Tsujikawa 1214f9e23b nghttpx: Reload configuration with SIGHUP
This commit implements configuration reloading with SIGHUP.
There are rough edges left:

* Rename SignalServer with more meaningful name, say, WorkerProcess.
* We should introduce global configuration object which is not
  affected by configuration reloading.  It should hold cmdcfgs, argc,
  argv, and last worker PID.
* We should close the listener file descriptor when some operation was
  failed after that.
2016-07-31 15:57:41 +09:00
Tatsuhiro Tsujikawa a54cda22ab nghttpx: Do creation of InheritedAddr in a dedicated function for reuse 2016-07-31 00:35:15 +09:00
Tatsuhiro Tsujikawa af5b354685 nghttp: next_weight_idx is enough to be an local variable 2016-07-29 19:36:05 +09:00
Tatsuhiro Tsujikawa 3c1c2c4aad nghttp: Allow multiple -p option
The N-th -p options sets N-th URI's weight.  If the number of -p is
less than the number of URIs, the last -p value is repeated.  If no -p
is set, use default weight, 16.
2016-07-27 05:10:27 +09:00
Tatsuhiro Tsujikawa 33153010c5 nghttpx: Retry memcached connection
Previously, we didn't retry request on connection failure.  Sometimes
we hit the edge case where connection is about to lost just when we
write request.  To avoid this situation, we now retry request to
failed attempt.  We also add ConnectBlocker to MemcachedConnection not
to attempt to connect to memcached if connection could not be made
previously.
2016-07-08 23:41:53 +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
Tomasz Buchert 5d3535126e Fix FTBFS on armel by explicitly including the <mutex> header. 2016-07-05 00:04:23 +09:00
Tatsuhiro Tsujikawa fd7d3c57d7 nghttpx: Use faster version of power
In our use case, x and y is quite small, and there is no chance for
overflow, and y is always integer.
2016-06-27 22:42:28 +09:00
Tatsuhiro Tsujikawa 179561e4be nghttpx: Cast to double to fix build with gcc 4.8 on Solaris 11 2016-06-27 22:33:25 +09:00
Tatsuhiro Tsujikawa 903e0077aa nghttpx: Fix build error with libressl 2016-06-27 22:29:07 +09:00
Tatsuhiro Tsujikawa 6fd4dd99da nghttpx: Update doc 2016-06-26 22:33:17 +09:00
Tatsuhiro Tsujikawa 65095c448d nghttpx: Fix compile error with gcc -Werror=comment 2016-06-25 23:57:40 +09:00
Tatsuhiro Tsujikawa 76e188e368 nghttpx: Fix compile error with gcc 2016-06-25 23:57:26 +09:00