envoyproxy/envoy

UDP should be supported during hot restart

Open

#34 732 ouverte le 13 juin 2024

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)C++ (5 373 forks)batch import
area/hot_restartarea/udpenhancementhelp wanted

Métriques du dépôt

Stars
 (27 997 stars)
Métriques de merge PR
 (Merge moyen 8j) (378 PRs mergées en 30 j)

Description

#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

Guide contributeur