-
Notifications
You must be signed in to change notification settings - Fork 109
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
Improve mirroring for high stress #2561
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting rid of the nits and requests for docs first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some more minor stuff, but it's worthy of approval.
Thanks for the docs, I'm happy now.
Co-authored-by: meowjesty <[email protected]>
Co-authored-by: meowjesty <[email protected]>
Co-authored-by: meowjesty <[email protected]>
Something is not working and I don't yet know what ;/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Closes #2529
TcpConnectionSniffer
usesbroadcast
channels (capacity - 512 TCP packets) to send incoming data in a non-blocking way.TcpSnifferApi
notifies the client about closed connection (and sends an error log) when it'sbroadcast::Receiver
is lagging.TcpConnectionSniffer
notifiesTcpSnifferApi
s about new connections viampsc
channels (capacity - 128 new sniffed connections). When a new connection is sniffed, the sniffer attempts to notify each client without blocking. If the client already has 128 queued new connections, client is not notified. There's some space for improvement here - instead of dropping new connection, we could be dropping the oldest one in the queue. However,mpsc::Sender
's api does not allow for it and we would need to implement some async circular FIFOPortSubscribe
/PortUnsubscribe
from a user actually changed the set of subscribed portshash_map::Entry
instead ofget() -> remove()