-
Notifications
You must be signed in to change notification settings - Fork 3.7k
loadbalancer: implement Hybrid-DSR using the annotation-based dispatch mode #41690
Copy link
Copy link
Closed
Closed
Copy link
Labels
area/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.Impacts bpf/ or low-level forwarding details, including map management and monitor messages.area/kprAnything related to our kube-proxy replacement.Anything related to our kube-proxy replacement.area/loadbalancingImpacts load-balancing and Kubernetes service implementationsImpacts load-balancing and Kubernetes service implementationsfeature/dsrRelates to Cilium's Direct-Server-Return feature for KPR.Relates to Cilium's Direct-Server-Return feature for KPR.kind/enhancementThis would improve or streamline existing functionality.This would improve or streamline existing functionality.kind/tech-debtTechnical debtTechnical debtpinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.
Description
Background:
The initial DSR implementation supports a "Hybrid" mode - where TCP services are accessed via DSR, and UDP services use SNAT.
Later we also introduced an annotation-based mode, where an annotation on the Service resource determines whether this Service is DSR-enabled. The datapath ends up checking the SVC_FLAG_FWD_MODE_DSR flag for all service entries.
Proposal:
Instead of maintaining two datapath parts for such "selective" DSR modes, re-use the annotation-based infrastructure to implement Hybrid-DSR. When Hybrid-DSR is enabled, have the controlplane set the SVC_FLAG_FWD_MODE_DSR flag for all TCP frontend entries. Respect this flag in the datapath, and remove any L4 proto-specific differentiation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.Impacts bpf/ or low-level forwarding details, including map management and monitor messages.area/kprAnything related to our kube-proxy replacement.Anything related to our kube-proxy replacement.area/loadbalancingImpacts load-balancing and Kubernetes service implementationsImpacts load-balancing and Kubernetes service implementationsfeature/dsrRelates to Cilium's Direct-Server-Return feature for KPR.Relates to Cilium's Direct-Server-Return feature for KPR.kind/enhancementThis would improve or streamline existing functionality.This would improve or streamline existing functionality.kind/tech-debtTechnical debtTechnical debtpinnedThese issues are not marked stale by our issue bot.These issues are not marked stale by our issue bot.