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

optimize disconnect handling rate #47637

Open
jkarneges opened this issue Oct 21, 2016 · 0 comments
Open

optimize disconnect handling rate #47637

jkarneges opened this issue Oct 21, 2016 · 0 comments

Comments

@jkarneges
Copy link
Member

jkarneges commented Oct 21, 2016

Currently, m2adapter processes disconnect events at a rate of 100/sec. Ideally we'd be able to handle a larger rate. Things to consider:

  • If there are too many pending disconnects, we should remove connection structures but send nothing to other components, or even ignore disconnect events completely. Connection structures will eventually be cleaned up when sessions time out. This is pretty much how things work with TCP, when the OS can't keep up with close packets.
  • Simply removing connection structures in m2adapter can cause internal overload. This is because m2adapter responds to batched keep-alives with individual cancels, so when pushpin-handler pings a thousand connections it thinks might exist, m2adapter will slap pushpin-handler around. m2adapter should respond with batched cancels, or it should ignore keep-alives for sessions it doesn't recognize.
  • Removing session structures in pushpin-handler is somewhat expensive due to having to muck with a bunch of tables and send stats. If there are a lot of disconnects occurring at once, we should consider a cheaper processing route and don't bother sending stats. Downstream stats listeners will have to timeout connections on their own in that case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant