Skip to content

feat: improve coordinator peer mapping performance#23696

Draft
sreya wants to merge 1 commit intomainfrom
tailnet-perf
Draft

feat: improve coordinator peer mapping performance#23696
sreya wants to merge 1 commit intomainfrom
tailnet-perf

Conversation

@sreya
Copy link
Collaborator

@sreya sreya commented Mar 26, 2026

  • Skip DB query in mappingQuery when no local mapper exists (~90% reduction)
  • Add O(1) set-based dedup to workQ (eliminates O(n²) during bursts)
  • Add tunnelsByPeer reverse index to skip irrelevant peer updates
  • Batch tailnet tunnel queries for reduced DB round-trips
  • Fix listenReadyForHandshake to return early on ErrDroppedMessages

@sreya sreya force-pushed the tailnet-perf branch 10 times, most recently from d6baf35 to 2dec561 Compare March 26, 2026 23:33
@sreya sreya changed the title perf(enterprise/tailnet): improve coordinator peer mapping performance feat: improve coordinator peer mapping performance Mar 26, 2026
@sreya
Copy link
Collaborator Author

sreya commented Mar 26, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2dec561a3b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sreya sreya force-pushed the tailnet-perf branch 2 times, most recently from 3262539 to d44bf05 Compare March 26, 2026 23:42
@sreya
Copy link
Collaborator Author

sreya commented Mar 26, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d44bf05d40

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sreya
Copy link
Collaborator Author

sreya commented Mar 26, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fd510c0e34

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Skip DB query in mappingQuery when no local mapper exists (~90% reduction)
- Add O(1) set-based dedup to workQ (eliminates O(n²) during bursts)
- Batch tailnet tunnel queries for reduced DB round-trips
- Fix listenReadyForHandshake to return early on ErrDroppedMessages
@sreya
Copy link
Collaborator Author

sreya commented Mar 27, 2026

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Successfully merging this pull request may close these issues.

1 participant