descriptors on graceful restart. [Yann Ylavic]
*) mod_http2: input buffering and dynamic flow windows for increased
- throughput. [Stefan Eissing]
+ throughput. Requires nghttp2 >= v1.5.0 features. Announced at startup
+ in mod_http2 INFO log as feature 'DWINS'. [Stefan Eissing]
*) mod_http2: h2 workers with improved scalability for better scheduling
performance. There are H2MaxWorkers threads created at start and the
dnl # nghttp2 >= 1.14.0: invalid header callback
AC_CHECK_FUNCS([nghttp2_session_callbacks_set_on_invalid_header_callback],
[APR_ADDTO(MOD_CPPFLAGS, ["-DH2_NG2_INVALID_HEADER_CB"])], [])
+dnl # nghttp2 >= 1.15.0: get/set stream window sizes
+ AC_CHECK_FUNCS([nghttp2_session_get_stream_local_window_size],
+ [APR_ADDTO(MOD_CPPFLAGS, ["-DH2_NG2_LOCAL_WIN_SIZE"])], [])
else
AC_MSG_WARN([nghttp2 version is too old])
fi
static void update_window(void *ctx, int stream_id, apr_off_t bytes_read)
{
h2_session *session = ctx;
+ h2_stream *stream;
if (bytes_read > 0) {
- h2_stream *stream = get_stream(session, stream_id);
apr_off_t consumed = bytes_read;
while (consumed > 0) {
consumed -= len;
}
- if (stream) {
+ (void)stream;
+#ifdef H2_NG2_LOCAL_WIN_SIZE
+ if ((stream = get_stream(session, stream_id))) {
int cur_size = nghttp2_session_get_stream_local_window_size(
session->ngh2, stream->id);
int win = stream->in_window_size;
session->id, stream_id, (long)bytes_read,
cur_size, stream->in_window_size);
}
+#endif
}
}
h2_beam_create(&stream->output, pool, id, "output", H2_BEAM_OWNER_RECV, 0,
session->s->timeout);
-
+
+#ifdef H2_NG2_LOCAL_WIN_SIZE
stream->in_window_size =
nghttp2_session_get_stream_local_window_size(
stream->session->ngh2, stream->id);
+#endif
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
H2_STRM_LOG(APLOGNO(03082), stream, "created"));
unsigned int change_prio : 1;
unsigned int sha256 : 1;
unsigned int inv_headers : 1;
+ unsigned int dyn_windows : 1;
} features;
static features myfeats;
#ifdef H2_NG2_INVALID_HEADER_CB
myfeats.inv_headers = 1;
#endif
+#ifdef H2_NG2_LOCAL_WIN_SIZE
+ myfeats.dyn_windows = 1;
+#endif
apr_pool_userdata_get(&data, mod_h2_init_key, s->process->pool);
if ( data == NULL ) {
ngh2 = nghttp2_version(0);
ap_log_error( APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(03090)
- "mod_http2 (v%s, feats=%s%s%s, nghttp2 %s), initializing...",
+ "mod_http2 (v%s, feats=%s%s%s%s, nghttp2 %s), initializing...",
MOD_HTTP2_VERSION,
myfeats.change_prio? "CHPRIO" : "",
myfeats.sha256? "+SHA256" : "",
myfeats.inv_headers? "+INVHD" : "",
+ myfeats.dyn_windows? "+DWINS" : "",
ngh2? ngh2->version_str : "unknown");
switch (h2_conn_mpm_type()) {