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

perf: improve derp connection establishment #1631

Merged
merged 10 commits into from
Oct 16, 2023
Merged

Conversation

dignifiedquire
Copy link
Contributor

@dignifiedquire dignifiedquire commented Oct 12, 2023

  • make sure that TLS session resumption is possible, by caching the TLS config in the derper
  • parallelise dials to derpers in the same region
  • expand the doctor derp-regions command

@dignifiedquire dignifiedquire marked this pull request as ready for review October 13, 2023 14:14
let err = first_err.unwrap();
Err(err)

Err(first_err.unwrap())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems a bit arbitrary to just return the first error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logging them at least now

@dignifiedquire dignifiedquire added this pull request to the merge queue Oct 16, 2023
Comment on lines 655 to 659
let conn = this.dial_node(&node).await;
match conn {
Ok(conn) => Ok((conn, node)),
Err(e) => Err(e),
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional, but isn't this this.dial_node(&node).await.map(|c| (c, node))?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
Err(e) => {
if first_err.is_none() {
first_err = Some(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

related to @rklaehn 's comment below, unless you return a Vec of errors you'll always have an arbitrary choice. Probably easier is to tracing::error!() log all the error cases here? or at least warn!.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@dignifiedquire dignifiedquire removed this pull request from the merge queue due to a manual request Oct 16, 2023
@dignifiedquire dignifiedquire added this pull request to the merge queue Oct 16, 2023
Merged via the queue into main with commit 615381c Oct 16, 2023
15 checks passed
@b5 b5 added this to the v0.8.0 milestone Oct 19, 2023
@dignifiedquire dignifiedquire deleted the fix-derp-dialing branch November 1, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants