-
Notifications
You must be signed in to change notification settings - Fork 205
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
Endpoint MAY discard CIDs #1992
Conversation
I think this is messy - I know there have been lengthy discussions. But sender also may have to track state. It would be better to have a fixed TP length of say, 5 CID's and only replenish when one is retired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issuing too many connection IDs doesn't hurt in the case where the server uses a deterministic routing scheme to associate connection IDs to connections (except for the obviously wasted bandwidth). However, there's a different approach (which I chose in my implementation). I'm keeping a mapping connection ID => connection around for every single connection ID I issue. This allows me to use very short (4 bytes) connection IDs. If an implementation like this issues too many connection IDs, and the peer starts dropping them, it will have to keep state for every dropped connection ID until the end of the connection.
This is trivially solved if each peer declares the number of connection IDs it is willing to store in a transport parameter. Based on @dtikhonov's thread on the mailing list, I was planning to contribute a PR for this.
If I understand @marten-seemann correctly, this is in line with what I propose, and which others have proposed earlier. |
@marten-seemann @mikkelfj : Like I said on list, I think it's fine to drive that issue (please do file an issue first), and send a PR along (ASAP). I'm merely clarifying existing text. |
Endpoints store received connection IDs for future use. An endpoint that | ||
receives excessive connection IDs MAY discard those it cannot store. An | ||
endpoint that issues connection IDs cannot expect its peer to store and use all | ||
issued connection IDs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Belated question: when you discard them, it seems you should not send a RETIRE_CONNECTION_ID frame, otherwise you may just get more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is that you can have an uncoordinated negotiation: I'm willing to issue 64, you only need 8. You take the 8 you want, let the remaining 56 fall on the floor, and then I'll replace the 8 you kept as you RETIRE them. If you RETIREd the 56 you didn't need, I'd replace those, and we'd get into an endless RETIRE/NEW drop for no purpose.
An endpoint should not assume that its peer will not drop any received CIDs.