Github user masaori335 commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/485#discussion_r54039631 --- Diff: proxy/http2/Http2ConnectionState.cc --- @@ -1160,3 +1162,31 @@ Http2ConnectionState::send_window_update_frame(Http2StreamId id, uint32_t size) SCOPED_MUTEX_LOCK(lock, this->ua_session->mutex, this_ethread()); this->ua_session->handleEvent(HTTP2_SESSION_EVENT_XMIT, &window_update); } + +// Return min_concurrent_streams_in when current client streams number is larger than max_active_streams_in. +// Main purpose of this is preventing DDoS Attacks. +unsigned +Http2ConnectionState::_adjust_concurrent_stream() +{ + int64_t current_client_streams = 0; + RecGetRawStatSum(http2_rsb, HTTP2_STAT_CURRENT_CLIENT_STREAM_COUNT, ¤t_client_streams); --- End diff -- Ah, `RecGetRawStatSum` gets global + thread local stats. I'll fix this. Thanks. I thought `RecGetGlobalRawStatSum` is global and `RecGetRawStatSum` is thread local one;)
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---