Skip to content
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

websocket: fix write back-pressure #618

Merged
merged 1 commit into from
May 4, 2021

Commits on Apr 30, 2021

  1. websocket: fix write back-pressure

    Websocket transport is eagerly writing to underlaying websocket
    without respecting back-pressure.
    When an event is emitted to multiple clients, socket.io adapter
    sends the same packet object to all socket clients.
    These packet objects are shared for all clients inside room.
    
    Once the packet is sent to transport,
    transport prepares buffer with transport headers and packet data
    and the sharing among clients is lost.
    
    This change significantly reduces memory usage when
    many packets are emitted to many clients in a burst.
    
        This change causes that buffered data is sent to clients
        more evenly packet by packet.
    Branislav Katreniak committed Apr 30, 2021
    Configuration menu
    Copy the full SHA
    bd40410 View commit details
    Browse the repository at this point in the history