Skip to content

Add support for multi-process port sharing with CIBIR.#5798

Open
ProjectsByJackHe wants to merge 15 commits intomainfrom
jackhe/sql-cibir-fix-sock-reservation
Open

Add support for multi-process port sharing with CIBIR.#5798
ProjectsByJackHe wants to merge 15 commits intomainfrom
jackhe/sql-cibir-fix-sock-reservation

Conversation

@ProjectsByJackHe
Copy link
Contributor

Description

Fixes #5795

The XDP datapath can be configured to intercept packets based on QUIC Connection ID instead of local port.
This behavior existed in MsQuic but was not heavily exercised until recently.
One issue was that MsQuic always attempted to reserve UDP / TCP sockets for each application server process.
But for multiple server processes that may want to share a single port, we would run into port collision errors.
This PR adds support for CIBIR across multiple processes on the same port and document the behavior

Testing

A new DataPathTest was added.

Documentation

Settings.md

@ProjectsByJackHe ProjectsByJackHe requested a review from a team as a code owner February 18, 2026 02:02
@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.66%. Comparing base (ed14762) to head (cabc5a8).
⚠️ Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5798      +/-   ##
==========================================
- Coverage   85.99%   85.66%   -0.34%     
==========================================
  Files          60       60              
  Lines       18729    18740      +11     
==========================================
- Hits        16106    16053      -53     
- Misses       2623     2687      +64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@guhetier guhetier left a comment

Choose a reason for hiding this comment

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

In general, I am concerned that we keep adding incremental exceptions to the port reservation logic to solve the next issue, but without having a clear design goal.
This code will be hard to maintain and confusing for apps as there is no simple rule about what can be done with ports.

I think we need to take the time soon to come up with a clear story about when can port be shared and when they can't + document it + check we implement it.

@ProjectsByJackHe
Copy link
Contributor Author

ProjectsByJackHe commented Feb 19, 2026

In general, I am concerned that we keep adding incremental exceptions to the port reservation logic to solve the next issue, but without having a clear design goal. This code will be hard to maintain and confusing for apps as there is no simple rule about what can be done with ports.

I think we need to take the time soon to come up with a clear story about when can port be shared and when they can't + document it + check we implement it.

I agree. I added a CIBIR.md.

@ProjectsByJackHe
Copy link
Contributor Author

In general, I am concerned that we keep adding incremental exceptions to the port reservation logic to solve the next issue, but without having a clear design goal. This code will be hard to maintain and confusing for apps as there is no simple rule about what can be done with ports.

I think we need to take the time soon to come up with a clear story about when can port be shared and when they can't + document it + check we implement it.

please see the updated XDP.md and CIBIR.md

@nibanks
Copy link
Collaborator

nibanks commented Mar 11, 2026

Maybe we should actually go through the rest of the standardization process for https://datatracker.ietf.org/doc/draft-banks-quic-cibir/ since you're still using it....

@guhetier
Copy link
Collaborator

Maybe we should actually go through the rest of the standardization process for https://datatracker.ietf.org/doc/draft-banks-quic-cibir/ since you're still using it....

Do you have more context about it? I am interested in understanding whether we should work on standardizing CIBIR or if another solution was adopted by other deployments that we should align with.

@nibanks
Copy link
Collaborator

nibanks commented Mar 11, 2026

Maybe we should actually go through the rest of the standardization process for https://datatracker.ietf.org/doc/draft-banks-quic-cibir/ since you're still using it....

Do you have more context about it? I am interested in understanding whether we should work on standardizing CIBIR or if another solution was adopted by other deployments that we should align with.

I know of no other solution/proposal that achieves what CIBIR does. We can chat more on Discord about the process.

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.

[Partner-SQL] Multiple Quic listeners needed on same port on Windows

5 participants