-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revise Handle Limited Open Connections #10355
Conversation
@mmeeks wrote in #10337 (comment)
Will remove this functional block |
ff7f556
to
32b688b
Compare
All checks have passed .. will rebase to master now .. (no merge yet, duh!) |
32b688b
to
92f7113
Compare
A weirdo merge conflict occurred via github here, which wasn't existing locally (rebased to master). |
So - there is once again a huge amount of change here - a ton of it is not related to reverting back to the state before we started making huge amounts of change. Again - I want to restore us to a known-safe state tested on millions of users - and then we take very, very small steps, incrementally, without huge and questionable cosmetic changes on top to improve the code. Perhaps it is nice to do some stream logging operator improvement - perhaps that makes people feel good - but to do that mixed with functional change, and/or to do it at all now - when the priority is getting us back to a known good state is highly unhelpful. Perhaps it would be better to have a more simple approach. Revert everything that went in recently - and then go over it again - breaking it down properly, thinking through the design carefully, and so on. At this point I'm basically not interested in any new features - connection limits, trottling, closing websockets, etc. - I want us back where we were. |
…{idle/poll} -> inactivity and use net::Defaults::InactivityTimeout (3600s) Drop virtual Socket:checkRemoval - checkRemoval is only called from `StreamSocket::handlePoll`, see commit d40887b Rename {idle/poll} -> inactivity and use net::Defaults::InactivityTimeout (3600s) - Clarify semantics w/ proper names - Use a commonly used keep-alive timeout value of 1 hour Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
…tions in UnitTimeout{Connections, None, WSPing} Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
…ty TO of `StreamSocket::checkRemoval` Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
…t and revert to original. Drop UnitWSD::configNet(). Partially reverts commit 9887ed1 - Use `net::Defaults` as a global, removing the singleton pattern - Drop `net::Defaults`'s `SocketPollTimeout`, `HTTPTimeout` fields and revert to original - Notable: `StreamSocket::parseHeader` uses `SocketPoll::DefaultPollTimeoutMicroS` for `delayMax` error-handling again (64s) instead of `_httpTimeout` (30s). - Drop `UnitWSD::configNet()` and just use `UnitWSD::configure()` for timeout UTs. Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
Use common stream-out method - net::Defaults - WebSocketHandler - add WS Ping details to dumpState() No change of semantics. Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
WS Ping timeout functionality was added in commit 994f8f9 and is removed with this patch as not deemed desirable anymore. Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
…s}tatsConnectionMod, {G->g}etStatsConnectionCount Note that `_statsConnectionCount` requires a lock for writing inside `statsConnectionMod` due to its global nature for many outside facing SocketPoll instances. Read only `getStatsConnectionCount` simply utilizes an CST atomic for lock-free operations. Its usage within `SocketPoll::poll` is well working as it would only use old data to block new connections and is freuqntly called. Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
…ery on `_connectionLimit > 0` Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
… single decimals from files like `/proc/sys/net/ipv4/tcp_max_orphans` Implementation is value- and thread-safe, utilizing `std::strtoll`. Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
…mum concurrent TCP connections, disable if undefined Used system value on a Linux kernel are - /proc/sys/net/ipv4/tcp_max_orphans See https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html - /proc/sys/net/nf_conntrack_max See https://www.kernel.org/doc/html/latest/networking/nf_conntrack-sysctl.html Previous confusion about 'max connections' semantics has been resolved, as this `net::Default::maxTCPConnections` is unrelated to session count but actual outfacing TCP connections only. Signed-off-by: Sven Göthel <[email protected]> Change-Id: Iad74f253bdac5636757b130b299b5deacda658db
218abb3
to
5577efe
Compare
rebased again, mmeeks branch (w/ some same commits) got merged, hence earlier confusion (collision). |
Will be revised to fully revert 2 commits which have been partially reverted and reapply changes on top of vanilla. |
Summary
This track follows up on PR #10334 and may include PR for issue #10337
Functional
SocketPoll
Style
net::Defaults
relatedSocketPoll::_limitedConnections
, use query method insteadSocketPoll
'sitemsErased
accounting while erasingSocket::isClosed()
Checklist
make prettier-write
and formatted the code.make check
make run
and manually verified that everything looks okay