Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ HTTP Connection

This tracks the number of origin connections denied due to being over the :ts:cv:`proxy.config.http.per_server.connection.max` limit.

.. ts:stat:: global proxy.process.http.pooled_server_connections integer
:type: counter

This metric tracks the number of server connections currently in the server session sharing pools. The server session sharing is
controlled by settings :ts:cv:`proxy.config.http.server_session_sharing.pool` and :ts:cv:`proxy.config.http.server_session_sharing.match`.


HTTP/2
------
Expand Down
4 changes: 4 additions & 0 deletions proxy/http/HttpConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@ register_stat_callbacks()
RECP_PERSISTENT, (int)http_ua_msecs_counts_errors_pre_accept_hangups_stat,
RecRawStatSyncIntMsecsToFloatSeconds);

RecRegisterRawStat(http_rsb, RECT_PROCESS, "proxy.process.http.pooled_server_connections", RECD_INT, RECP_NON_PERSISTENT,
(int)http_pooled_server_connections_stat, RecRawStatSyncSum);
HTTP_CLEAR_DYN_STAT(http_pooled_server_connections_stat);

// Transactional stats

RecRegisterRawStat(http_rsb, RECT_PROCESS, "proxy.process.http.incoming_requests", RECD_COUNTER, RECP_PERSISTENT,
Expand Down
1 change: 1 addition & 0 deletions proxy/http/HttpConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ enum {
http_current_client_transactions_stat,
http_total_incoming_connections_stat,
http_current_server_transactions_stat,
http_pooled_server_connections_stat,

// Http Abort information (from HttpNetConnection)
http_ua_msecs_counts_errors_pre_accept_hangups_stat,
Expand Down
5 changes: 5 additions & 0 deletions proxy/http/HttpSessionManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ ServerSessionPool::acquireSession(sockaddr const *addr, CryptoHash const &hostna
}
if (zret == HSM_DONE) {
to_return = first;
HTTP_DECREMENT_DYN_STAT(http_pooled_server_connections_stat);
m_fqdn_pool.erase(first);
m_ip_pool.erase(to_return);
}
Expand All @@ -191,6 +192,7 @@ ServerSessionPool::acquireSession(sockaddr const *addr, CryptoHash const &hostna
}
if (zret == HSM_DONE) {
to_return = first;
HTTP_DECREMENT_DYN_STAT(http_pooled_server_connections_stat);
m_ip_pool.erase(first);
m_fqdn_pool.erase(to_return);
}
Expand Down Expand Up @@ -218,6 +220,8 @@ ServerSessionPool::releaseSession(PoolableSession *ss)
m_ip_pool.insert(ss);
m_fqdn_pool.insert(ss);

HTTP_INCREMENT_DYN_STAT(http_pooled_server_connections_stat);

Debug("http_ss",
"[%" PRId64 "] [release session] "
"session placed into shared pool",
Expand Down Expand Up @@ -288,6 +292,7 @@ ServerSessionPool::eventHandler(int event, void *data)
// Drop connection on this end.
s->do_io_close();
found = true;
HTTP_DECREMENT_DYN_STAT(http_pooled_server_connections_stat);
break;
}
}
Expand Down