-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ambient: add traffic routing docs #12781
ambient: add traffic routing docs #12781
Conversation
This fills in part of the architecture doc for ambient. Note this is intentionally low-level. This attempts to mirror https://istio.io/latest/docs/ops/configuration/traffic-management/traffic-routing/ but for ambient.
@@ -13,4 +13,77 @@ This page is under construction. | |||
|
|||
## Traffic routing | |||
|
|||
In ambient mode, workloads can fall into 3 categories: | |||
* Uncaptured: this is a standard pod without any mesh features enabled | |||
* Captured: this is a pod that has traffic intercepted by `ztunnel`. Pods can be captured by setting the `istio.io/dataplane-mode=ambient` label on a namespace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume there will be some intro material that describes the architectural components, but I wonder if it might be worth adding some glossary entries and reference them in the first use in this doc, to make it more easy to read alone?
* Captured: this is a pod that has traffic intercepted by `ztunnel`. Pods can be captured by setting the `istio.io/dataplane-mode=ambient` label on a namespace. | |
* Captured: this is a pod that has traffic intercepted by {{< gloss >}}ztunnel{{< /gloss >}}. Pods can be captured by setting the `istio.io/dataplane-mode=ambient` label on a namespace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is intended to be the deep dive. Writing the docs in reverse order, but users will see this last. Agree on glossary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ill make another PR with glossary
In ambient mode, workloads can fall into 3 categories: | ||
* Uncaptured: this is a standard pod without any mesh features enabled | ||
* Captured: this is a pod that has traffic intercepted by `ztunnel`. Pods can be captured by setting the `istio.io/dataplane-mode=ambient` label on a namespace. | ||
* Waypoint enabled: this is a pod that is "Captured" *and* has a waypoint proxy deployed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Waypoint enabled: this is a pod that is "Captured" *and* has a waypoint proxy deployed. | |
* Waypoint enabled: this is a pod that is "Captured" *and* has a {{< gloss >}}waypoint proxy{{< /gloss >}} deployed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting the next line just uses waypoint, would it be better to have the single word in the glossary?
Requests to a `Service` will be sent to an endpoint within the `Service`, and requests directly to a `Pod` IP would be go directly to that `Pod` IP. | ||
|
||
However, depending on the destination's capabilities, different behavior will occur. | ||
If the destination is also captured, or otherwise has Istio proxy capabilities (such as a sidecar), the request will be upgraded to an encrypted HBONE tunnel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the destination is also captured, or otherwise has Istio proxy capabilities (such as a sidecar), the request will be upgraded to an encrypted HBONE tunnel. | |
If the destination is also captured, or otherwise has Istio proxy capabilities (such as a sidecar), the request will be upgraded to an encrypted {{< gloss >}}HBONE{{< /gloss >}} tunnel. |
|
||
When the destination is waypoint enabled, all requests *must* go through the waypoint, where policy is enforced. | ||
The `ztunnel` will enforce this occurs. | ||
However, there is an edge case: a well behaving HBONE client (such as another ztunnel or Istio sidecar) would know to send to the waypoint, but for other clients |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, there is an edge case: a well behaving HBONE client (such as another ztunnel or Istio sidecar) would know to send to the waypoint, but for other clients | |
However, there is an edge case: a well behaving HBONE client (such as another `ztunnel` or Istio sidecar) would know to send to the waypoint, but other clients |
The `ztunnel` will enforce this occurs. | ||
However, there is an edge case: a well behaving HBONE client (such as another ztunnel or Istio sidecar) would know to send to the waypoint, but for other clients | ||
(such as a workload outside of the mesh) likely would not know anything about waypoint proxies and send requests directly. | ||
When these direct calls are made, the ztunnel will "hairpin" the request to its own waypoint to ensure policies are properly enforced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly does "hairpin" mean? "Capture and redirect"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically
client -> ztunnel -> waypoint -> ztunnel
@@ -13,4 +13,77 @@ This page is under construction. | |||
|
|||
## Traffic routing | |||
|
|||
In ambient mode, workloads can fall into 3 categories: | |||
* Uncaptured: this is a standard pod without any mesh features enabled. | |||
* Captured: this is a pod that has traffic intercepted by `ztunnel`. Pods can be captured by setting the `istio.io/dataplane-mode=ambient` label on a namespace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also mention the redirection annotation on the pod here @howardjohn ?
Co-authored-by: Lin Sun <[email protected]>
If the destination is also captured, or otherwise has Istio proxy capabilities (such as a sidecar), the request will be upgraded to an encrypted HBONE tunnel. | ||
If the destination has a waypoint proxy, in addition to being upgraded to HBONE, the request will instead be forwarded to that waypoint. | ||
|
||
Note that in the case of a request to a `Service`, a specific endpoint will be selected to determine if it has a waypoint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to explain how the specific endpoint would be selected? Is it randomly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is an implementation detail - currently its random but we will optimize it in the future. I don't mind putting it but it will change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, ok, SGTM not documenting it for now.
For direct requests to `Pod`s, these are simply forwarded directly after policy is applied. | ||
|
||
For requests to `Service`s, the waypoint will also apply routing and load balancing. | ||
By default, a `Service` will simply route to itself, load balancing across its endpoints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does waypoint only route to waypoint enabled endpoints?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contents LGTM, left a few questions hoping to get some clarification!
Co-authored-by: Frank Budinsky <[email protected]>
* ambient: add traffic routing docs This fills in part of the architecture doc for ambient. Note this is intentionally low-level. This attempts to mirror https://istio.io/latest/docs/ops/configuration/traffic-management/traffic-routing/ but for ambient. * Address Frank's comments * Update content/en/docs/ops/ambient/architecture/index.md Co-authored-by: Lin Sun <[email protected]> * Update content/en/docs/ops/ambient/architecture/index.md Co-authored-by: Frank Budinsky <[email protected]> --------- Co-authored-by: Lin Sun <[email protected]> Co-authored-by: Frank Budinsky <[email protected]>
This fills in part of the architecture doc for ambient.
Note this is intentionally low-level. This attempts to mirror https://istio.io/latest/docs/ops/configuration/traffic-management/traffic-routing/ but for ambient.
Please provide a description for what this PR is for.
And to help us figure out who should review this PR, please
put an X in all the areas that this PR affects.