Skip to content
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

Document LoadBalancerMode related feature gate and configuration #5251

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

tnqn
Copy link
Member

@tnqn tnqn commented Jul 14, 2023

For #5025

@tnqn tnqn added kind/documentation Categorizes issue or PR as related to a documentation. area/proxy Issues or PRs related to proxy functions in Antrea labels Jul 14, 2023
@tnqn tnqn added this to the Antrea v1.13 release milestone Jul 14, 2023
@tnqn tnqn requested review from antoninbas and jianjuns July 14, 2023 16:10
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments and suggestions, otherwise lgtm

Nodes. Currently, it has two options: nat (default) and dsr.

* In NAT mode, external traffic is SNAT'd when it's load balanced across Nodes
to ensure symmetric path. It's the default and the most applicable mode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
to ensure symmetric path. It's the default and the most applicable mode.
to ensure symmetric paths. It's the default and the most general mode.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* In DSR mode, external traffic is never SNAT'd and backend Pods running on
Nodes that are not the ingress Node can reply to clients directly, bypassing
the ingress Node. Therefore, traffic in DSR mode usually has lower latency,
higher output bandwidth, and preserved client IP. Currently, it is applicable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
higher output bandwidth, and preserved client IP. Currently, it is applicable
higher throughput, and can preserve client IP. Currently, it is only applicable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Nodes that are not the ingress Node can reply to clients directly, bypassing
the ingress Node. Therefore, traffic in DSR mode usually has lower latency,
higher output bandwidth, and preserved client IP. Currently, it is applicable
to Linux Nodes, encap mode, and IPv4 cluster. The feature gate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/cluster/clusters

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

`LoadBalancerModeDSR` must be enabled to use this mode for any Service.

You can make the following changes to the `antrea-config` ConfigMap to specify
load balancer mode for all Services:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a load balancer mode

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to "the default load balancer mode".

mode determines how external traffic destined to LoadBalancerIPs and ExternalIPs of Services is processed when it's load
balanced across Nodes. In DSR mode, external traffic is never SNAT'd and backend Pods running on Nodes that are not the
ingress Node can reply to clients directly, bypassing the ingress Node. Therefore, traffic in DSR mode usually has lower
latency, higher output bandwidth, and preserved client IP. It's only meaningful to use feature when AntreaProxy is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same suggestion as above

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


#### Requirements for this Feature

- `AntreaProxy` is enabled.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like there are more requirements, which we typically list here:

  • AntreaProxy with proxyAll is enabled.
  • IPv4 only
  • Linux Nodes only
  • Encap mode only

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

can be used to specify how you want AntreaProxy to handle external traffic
destined to LoadBalancerIPs and ExternalIPs of Services. Specifically, the mode
determines how external traffic is processed when it's load balanced across
Nodes. Currently, it has two options: nat (default) and dsr.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nat (defualt) and dsr?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, what do you mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant add "`" around "nat" and "drs".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

docs/antrea-proxy.md Outdated Show resolved Hide resolved
docs/antrea-proxy.md Outdated Show resolved Hide resolved
docs/antrea-proxy.md Outdated Show resolved Hide resolved
docs/feature-gates.md Outdated Show resolved Hide resolved
docs/antrea-proxy.md Outdated Show resolved Hide resolved
docs/feature-gates.md Outdated Show resolved Hide resolved
@tnqn tnqn force-pushed the doc-dsr branch 2 times, most recently from 021ad52 to 0e3792a Compare July 18, 2023 14:18
antoninbas
antoninbas previously approved these changes Jul 18, 2023
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple nits, LGTM

docs/antrea-proxy.md Outdated Show resolved Hide resolved

* In DSR mode, external traffic is never SNAT'd and backend Pods running on
Nodes that are not the ingress Node can reply to clients directly, bypassing
the ingress Node. Therefore, DSR mode can preserve client IP of requests, and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the client IP

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -218,3 +274,8 @@ There are two important prerequisites for this feature:
greater than 65535 seconds will be truncated and the Antrea Agent will log a
warning. [We do not intend to address this
limitation](https://github.com/antrea-io/antrea/issues/1578).
* Due to the use of the "learn" action on the implementation of DSR mode, the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/on/in

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

antoninbas
antoninbas previously approved these changes Jul 19, 2023
@antoninbas
Copy link
Contributor

/skip-all

@tnqn
Copy link
Member Author

tnqn commented Jul 20, 2023

@antoninbas just removed an empty in the latest update.

@antoninbas
Copy link
Contributor

/skip-all

@antoninbas antoninbas merged commit f96efa2 into antrea-io:main Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/proxy Issues or PRs related to proxy functions in Antrea kind/documentation Categorizes issue or PR as related to a documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants