Open ohadvano opened 1 month ago
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
not stale
I would like to add support for deferring the selection of upstream cluster in UDP proxy flows. The use case I am trying to allow is being able to iterate a UDP session filter chain, where one of the filters in the chain resolves the name of the upstream cluster. Then, by setting some filter state object, we are able to dynamically select the upstream cluster. This is similar behavior to how TCP proxy is able to select upstream cluster based on filter state value (
envoy.tcp_proxy.cluster
), as described in: https://www.envoyproxy.io/docs/envoy/latest/configuration/advanced/well_known_filter_stateThe problem achieving this functionality, is that in current state,
udp_proxy
is a per-worker instance, and it managescluster_info
objects (which correspond to upstream clusters), andcluster_info
managesudp_sessions
objects. With this design, it is not possible to first instantiate a UDP session, select the cluster name and then choose the relevantcluster_info
.I would like to refactor the UDP proxy functionality by extracting ownership of UDP sessions from the
cluster_info
. The UDP proxy will own, separately, the clusters definitions and the sessions, and will do the matching between the UDP session and the cluster, when the data is available (either if known in advance by static configuration or resolved dynamically similar to TCP proxy's capabilities)cc @mattklein123, @RyanTheOptimist