Skip to content

Support Dual Stack in Istio based on optimized design solution #40394

Open
@zhlsunshine

Description

@zhlsunshine
Contributor

(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:

  1. 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
  2. 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

hzxuzhonghu commented on Aug 11, 2022

@hzxuzhonghu
Member

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

zhlsunshine commented on Aug 12, 2022

@zhlsunshine
ContributorAuthor

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.

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

kyessenov commented on Aug 12, 2022

@kyessenov
Contributor

@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

hzxuzhonghu commented on Aug 12, 2022

@hzxuzhonghu
Member

I am not sure, i donot have a chance to look at that yet

kyessenov

kyessenov commented on Aug 12, 2022

@kyessenov
Contributor

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

costinm commented on Aug 17, 2022

@costinm
Contributor

For dual stack - clearly good idea.

I think for stateful sets it is also strictly better than what we have today.

howardjohn

howardjohn commented on Aug 17, 2022

@howardjohn
Member

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

howardjohn commented on Aug 17, 2022

@howardjohn
Member

Maybe Envoy can be optimized to not drain on multiple addresses if the only thing changing is removing/adding an address?

costinm

costinm commented on Aug 17, 2022

@costinm
Contributor

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

jacob-delgado commented on Aug 17, 2022

@jacob-delgado
Contributor

Maybe I'm lost, but I think he's referring to

DefaultAddress string `json:"defaultAddress,omitempty"`

and subsequently
func (s *Service) GetAddressForProxy(node *Proxy) string {

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

ClusterVIPs AddressMap `json:"clusterVIPs,omitempty"`
but I think he wants to alter the DefaultAddress.

kyessenov

kyessenov commented on Aug 17, 2022

@kyessenov
Contributor

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

howardjohn commented on Aug 17, 2022

@howardjohn
Member

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

zhlsunshine commented on Aug 18, 2022

@zhlsunshine
ContributorAuthor

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

removed
lifecycle/staleIndicates a PR or issue hasn't been manipulated by an Istio team member for a while
on Feb 20, 2023
linsun

linsun commented on Mar 21, 2023

@linsun
Member

headless and service entry support

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

zhlsunshine commented on Mar 21, 2023

@zhlsunshine
ContributorAuthor

headless and service entry support

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?

Hi @linsun, headless and service 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

linsun commented on Mar 21, 2023

@linsun
Member

Hi @zhlsunshine yes, that makes sense, we'll need to support each single stack before dual stack. :)

added
lifecycle/staleIndicates a PR or issue hasn't been manipulated by an Istio team member for a while
on Sep 18, 2023
added
lifecycle/staleproofIndicates a PR or issue has been deemed to be immune from becoming stale and/or automatically closed
and removed
lifecycle/staleIndicates a PR or issue hasn't been manipulated by an Istio team member for a while
on Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementlifecycle/staleproofIndicates a PR or issue has been deemed to be immune from becoming stale and/or automatically closed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @costinm@howardjohn@linsun@zhlsunshine@john-a-joyce

        Issue actions

          Support Dual Stack in Istio based on optimized design solution · Issue #40394 · istio/istio