-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[4.3] Improve handling of slow websocket clients (#6606)
* Improve handling of slow websocket clients When a websocket client is having trouble reading messages off its socket, backpressure will cause the mailbox of the blackhole_socket_handler to start to fill up with {send_data, _} tuples from blackhole_data_emitter. This is due to the sending of data being stuck in prim_inet:send/3. We add two mechnisms to try to avoid the server being harshly impacted by slow clients: 1. Reduce the send_timeout blackhole uses to more quickly terminate the socket in the event of slow sends 2. Check the mailbox of blackhole_socket_handler from blackhole_data_emitter before sending the {send_data, _} tuple, opting to shed the load while waiting. * unused * unused
- Loading branch information
1 parent
6deeab2
commit 72c5328
Showing
9 changed files
with
190 additions
and
68 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
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.