-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cool#9833: Mitigate connection count limitation
- ProtocolHandlerInterface::checkTimeout(..) is now called via StreamSocket::checkRemoval() to ensure tests even w/o input data (was: handlePoll()) - ProtocolHandlerInterface::checkTimeout(..) - Add bool return value: true -> shutdown connection, caller shall stop processing - Implemented for http::Session - Timeout (30s) net::Config::HTTPTimeout with missing response - Implemented for WebSocketHandler - Timeout (2s = net::Config::WSPingTimeout) after missing WS native frame ping/pong (server only) - StreamSocket::checkRemoval(..) - called directly from SocketPoll::poll() - only for IPv4/v6 network connections - similar to ProtocolHandlerInterface::checkTimeout(..) - calls ProtocolHandlerInterface::checkTimeout(..) - added further criteria (age, throughput, ..) - Timeout (64s = net::Config::SocketPollTimeout) if (now - lastSeen) > timeout - Timeout (12 hours) net::Config::MaxDuration if (now - creationTime) > timeout - TODO: Throughput/bandwitdh disabled, find proper metrics/timing - TODO: Add maximimal IPv4/IPv6 socket-count criteria, drop oldest. - SocketPoll::poll() - Additionally erases if !socket->isOpen() || socket->checkRemoval() Signed-off-by: Sven Göthel <[email protected]> Change-Id: I7e1a9329e0848c40a210f6250e29e26950da6fbc
- Loading branch information
Sven Göthel
committed
Sep 9, 2024
1 parent
63c4ba8
commit 661dcde
Showing
10 changed files
with
904 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.