Description
(This is used to request new product features, please visit https://discuss.istio.io for questions on using Istio)
In general, Isito can support dual stack based on this envoy feature and it has been implemented in extra branch experimental-dual-stack
of Istio. However, the optimized design solution can help to eliminate a lot of duplicated configuration compare with the experimental one.
Describe the feature request
There are 2 parts for supporting Dual Stack in Istio based on new design solution as following:
- Downstream part: Multiple addresses should be held in every listener in downstream
The issue Support multiple addresses per listener in Envoy includes all related PRs, and the API changes PR for listener is: PR#21391 - Upstream part: Smarter way to pick endpoints for clusters in upstream
The issue api, extend BindConfig to multiple addresses in Envoy includes all related PRs, and the API changes PR for listener is: PR#22639 and PR#22639
Please refer to design doc for more details.
Describe alternatives you've considered
There is an implementation for dual stack support in extra branch experimental-dual-stack
of Istio. But it imports duplicated configuration and inflexible.
Affected product area (please put an X in all that apply)
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
Affected features (please put an X in all that apply)
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Multi Control Plane
Additional context
Activity
hzxuzhonghu commentedon Aug 11, 2022
One case useful i can think of for now is for tcp headless service, we build one listener per pod instance. With the new version, we can build only one listener.
zhlsunshine commentedon Aug 12, 2022
Hi @hzxuzhonghu, yeah, that's a good use case. However, we have to consider how to implement traffic route if the network session is stateful.
kyessenov commentedon Aug 12, 2022
@hzxuzhonghu Are you sure the listener update is in-place? Otherwise, you're draining connections any time another endpoint stands up for a headless service.
hzxuzhonghu commentedon Aug 12, 2022
I am not sure, i donot have a chance to look at that yet
kyessenov commentedon Aug 12, 2022
It'd be strictly worse without support for delta updates for additional addresses. I haven't checked either. This is for headless sets, dual stack is a good idea.
costinm commentedon Aug 17, 2022
For dual stack - clearly good idea.
I think for stateful sets it is also strictly better than what we have today.
howardjohn commentedon Aug 17, 2022
For headless the XDS size is strictly better but there would be draining anytime any endpoint changes. Ive tested in #40409 (didn't test the drain though, just assumed)
howardjohn commentedon Aug 17, 2022
Maybe Envoy can be optimized to not drain on multiple addresses if the only thing changing is removing/adding an address?
costinm commentedon Aug 17, 2022
This should also be used for service VIPs for multi-cluster, to allow use of external dns servers. Right now we rely on DNS interception and there are limitations. Instead we should send the VIPs from all clusters.
jacob-delgado commentedon Aug 17, 2022
Maybe I'm lost, but I think he's referring to
istio/pilot/pkg/model/service.go
Line 79 in a2a370e
and subsequently
istio/pilot/pkg/model/service.go
Line 755 in a2a370e
with the idea that dual stack Kubernetes clusters have 2 VIPs, one for IPv4 and IPv6 if a Service has both ipFamilies defined.
Thoughts @costinm and @howardjohn ? In the meeting it was suggested he could use
istio/pilot/pkg/model/service.go
Line 75 in a2a370e
DefaultAddress
.kyessenov commentedon Aug 17, 2022
In-place listener update could handle multiple addresses, but the problem is that these listeners are using a poorly supported (and previously deprecated) option for non-binding addresses. It might be better to switch to using matchers for headless services, which will avoid any drain.
howardjohn commentedon Aug 17, 2022
I generally agree, the only issue is we cannot just migrate headless services, we need to migrate everything, I think. Which we should/will do, just not a small effort
zhlsunshine commentedon Aug 18, 2022
Hi all, thank you for all your comments, and thanks for John's PR#40409, I think it's a great example of using multi-addresses per listener for headless service. I understand that all these changes are not a small effort, however, let's brainstorm to make it happen. BTW, I drafted an initialized PR#40539, any idea?
26 remaining items
linsun commentedon Mar 21, 2023
Any other area that is lacking dual stack support in Istio sidecars?
One thing I could think of is integrate dual stack with ambient mesh?
zhlsunshine commentedon Mar 21, 2023
Hi @linsun,
headless
andservice entry
are the 2 major areas need to be handled. And for Dual Stack support with ambient mesh, I think the single stack should be the first, especially IPv6 support should be okay, then Dual Stack. Does it make sense?linsun commentedon Mar 21, 2023
Hi @zhlsunshine yes, that makes sense, we'll need to support each single stack before dual stack. :)