Skip to content

Notifications (c/s and p2p) can overflow write queue. #902

Description

@evoskuil

An unresponsive peer/client or low rate limit can cause a backlog of unsolicited (notification) writes. These have generally been considered safe, since the caller doesn't control them. However caller can now control subscription and can ping while being slow to read. So there should be a HWM imposed due to excessive backlogging, dropping the peer. While this issue can be self-imposed due to a low configured rate limit or just a slow network, however those are configuration issues (i.e. raise limit, reduce channel count). But there's no solution other than (1) drop messages, or (2) drop peers. Since notifications don't wait. Dropping some messages works, because broadcast is designed for that. However dropping subscribed messages on a stateful connection is problematic. Also dropping conditionally wouldn't generally solve the problem. So a HWM that drops peers is required. This should be based on bytes held in the send queue for a given channel and configurable for all channels and by channel type to tighten it (just as the rate limit).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions