-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Allow applications to specify MaxPacketBufferSize #4553
Comments
This is already possible. You can disable DPLPMTUD and set the initial packet size. |
Can you point me to how to set the initial packet size when DPLPMTUD is disabled? The doc says |
Looks like we didn't properly update the document the documentation when we introduced |
@marten-seemann to be clear, we don't want to disable PMTU Discovery. To be clear, what we really want is for the server to advertise a maximum packet size that it is willing to receive. Today, this value is hardcoded as a constant of MaxPacketBufferSize. The reason why we want to do this, is because we don't want clients to exceed that value when doing PMTU discovery because it is possible that during the QUIC connection lifetime, that the PMTU decreases due to packet re-routing associated to how our anycast network works. Since PMTU doesn't support today the capability of decreasing in such event of MTU changing over time, then we need to guarantee that the server advertises the maximum value that it can receive packets in the event that a change happens. So, that it is the reason why we would like to make this configurable for the receiving side. |
Got it, so #4558 doesn't fix your issue (#3955). While I understand that maxing |
In our case we actually need the packet size to be slightly lower than the MTU of the network, because we need additional encapsulation to reroute packets. So I don't think PMTUD can account for the additional encapsulation. |
@marten-seemann I agree with you that #3955 would fix the issue. However, we are in a tight schedule here and I am not sure when that one would be fixed. For instance, would you be ok with reading the value that we want to advertise from an ENV variable? (os.GetEnv()), and use that to advertise here: https://github.com/quic-go/quic-go/blob/master/connection.go#L301 This way, it wouldn't be on the public API but it would allow us to configure it, until #3955 is addressed. |
Hi @marten-seemann, I've opened a PR to add max UDP payload size in the config. Can you review it and see if that's a reasonable workaround until #3955 is addressed? |
Some applications might want to use a MaxPacketBufferSize that is less than 1452 bytes. For example, some networks might have middle boxes that adds extra encapsulation before reaching the server. To support this, maybe we can add a new option to Config. Then we can pass it to TransportParameters to advertise the value to the peer.
@marten-seemann I'm happy to open a PR, but I have some questions about other places using
MaxPacketBufferSize
. I see it is also used in buffer_pool and stream frames. What is the implication if the advertisedmaxUDPPayloadSize
is different from size of the buffer pool and stream frames?The text was updated successfully, but these errors were encountered: