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

Minimize discovery requests from broadcaster #1850

Closed
yondonfu opened this issue Apr 22, 2021 · 2 comments
Closed

Minimize discovery requests from broadcaster #1850

yondonfu opened this issue Apr 22, 2021 · 2 comments
Assignees

Comments

@yondonfu
Copy link
Member

yondonfu commented Apr 22, 2021

Bs currently can send a lot of discovery requests to Os when using the default on-chain discovery mechanism on mainnet. Many of these discovery requests are cancelled in-flight because once B receives a sufficient # of responses or hits a timeout, the remaining in-flight requests are cancelled. We believe that many cancelled in-flight requests can cause:

  • Os to see TLS handshake errors in their logs because the connection was abruptly aborted before the TLS handshake completed
  • In certain cases, this type of request behavior might be flagged as DoS activity by services used by Os

In order to address this, we probably should look to minimize the # of cancelled in-flight requests and more generally minimize the # of discovery requests sent by B (perhaps by caching entire OrchestratorInfo responses so that they can be re-used for a period of time across different streams from B without requiring an additional discovery request).

Spec for solution TBD.

@yondonfu
Copy link
Member Author

It is a little hard to cache OrchestratorInfo messages to be used across streams right now because each OrchestratorInfo message is associated with an auth token which is meant to be used for an individual stream. The expectation is that there is a unique auth token per stream which would involve a GetOrchestrator call prior to the start of any stream. We could consider other updates here in the future that don't involve querying all known Os before the start of a stream, but for now I'm inclined to do the following which I think will help:

  • Minimize the # of quick request cancellations that would cut a connection before TLS handshake completes
  • Minimize the # of times that discovery needs to be run during a stream

Two issues created to address these two points are #1853 and #1852.

@yondonfu
Copy link
Member Author

I think this should be addressed by the solutions documented in #2329 so closing.

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

2 participants