仓库指标
- Star
- (27,997 star)
- PR 合并指标
- (平均合并 8天) (30 天内合并 378 个 PR)
描述
#19454 added software support for QUIC during hot restart. #34731 is open for doing that with eBPF.
I believe for UDP it is not possible to use eBPF because there is no dynamic lookup table (though possibly one could generate and install a rule when hot restart begins, using a lookup table of the connections that exist at that time, and remove that rule when the parent instance terminates).
Apparently during hot restart the current behavior is UDP listeners almost entirely cease to function.
A software UDP implementation could theoretically mirror what was done for QUIC; a lookup table of address tuples (source IP, source port, destination IP, destination port) on the parent instance, each incoming packet checked against that table, delivered as usual if present, or forwarded to the child instance if not present.
Steps to this:
- child instance should not listen for UDP until the parent instance stops listening (this step alone would at least fix "not functioning at all during hot restart")
- parent instance would need to keep track of active "connections" in order to populate such a lookup table
- parent instance would need to, during hot restart, check every packet against that table and forward if necessary
- child instance would need to receive forwarded packets and deliver them as if they were not forwarded