Skip to content

Explain the non-transparent mode design decision for TCP/UDP#685

Merged
arkodg merged 6 commits intoenvoyproxy:mainfrom
zhaohuabing:non-transparent
Nov 7, 2022
Merged

Explain the non-transparent mode design decision for TCP/UDP#685
arkodg merged 6 commits intoenvoyproxy:mainfrom
zhaohuabing:non-transparent

Conversation

@zhaohuabing
Copy link
Copy Markdown
Member

Explain the non-transparent mode design decision for TCP/UDP

#641

@zhaohuabing zhaohuabing requested a review from a team as a code owner November 3, 2022 02:16
@zhaohuabing zhaohuabing changed the title Explain the non-transparent mode design decision for TCP/UDP Explain the non-transparent mode design decision for TCP/UDP(WIP) Nov 3, 2022
Signed-off-by: zhaohuabing <zhaohuabing@gmail.com>
Signed-off-by: zhaohuabing <zhaohuabing@gmail.com>
@zhaohuabing zhaohuabing changed the title Explain the non-transparent mode design decision for TCP/UDP(WIP) Explain the non-transparent mode design decision for TCP/UDP Nov 3, 2022
@zhaohuabing zhaohuabing mentioned this pull request Nov 3, 2022
@zhaohuabing zhaohuabing force-pushed the non-transparent branch 2 times, most recently from 0b52467 to dbae48c Compare November 3, 2022 03:41
Signed-off-by: zhaohuabing <zhaohuabing@gmail.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 3, 2022

Codecov Report

Merging #685 (a56a039) into main (10eb279) will increase coverage by 0.18%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #685      +/-   ##
==========================================
+ Coverage   63.54%   63.73%   +0.18%     
==========================================
  Files          47       47              
  Lines        5766     5749      -17     
==========================================
  Hits         3664     3664              
+ Misses       1877     1861      -16     
+ Partials      225      224       -1     
Impacted Files Coverage Δ
internal/provider/kubernetes/httproute.go 59.25% <0.00%> (-8.24%) ⬇️
internal/cmd/root.go 100.00% <0.00%> (ø)
internal/provider/kubernetes/gateway.go 52.23% <0.00%> (+2.55%) ⬆️
internal/provider/kubernetes/gatewayclass.go 75.36% <0.00%> (+5.07%) ⬆️
internal/cmd/versions.go 50.00% <0.00%> (+21.42%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@arkodg arkodg requested a review from youngnick November 3, 2022 21:24
Signed-off-by: zhaohuabing <zhaohuabing@gmail.com>
arkodg
arkodg previously approved these changes Nov 4, 2022
Copy link
Copy Markdown
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

thanks for writing this out, left some nits, overall LGTM

Signed-off-by: zhaohuabing <zhaohuabing@gmail.com>
Co-authored-by: Arko Dasgupta <arkodg@users.noreply.github.com>
Signed-off-by: zhaohuabing <zhaohuabing@gmail.com>
@zhaohuabing
Copy link
Copy Markdown
Member Author

thanks for writing this out, left some nits, overall LGTM

@arkodg Thanks for helping me with these technical and grammatical issues.

Copy link
Copy Markdown
Contributor

@danehans danehans left a comment

Choose a reason for hiding this comment

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

Adding comments that can be resolved in follow-on PR. Overall /lgtm.

TCP traffic from the downstream to the upstream.

For UDP, Envoy receives UDP packages from the downstream, and uses its own IP address as the sender IP address when
proxying the UDP packages to the upstream.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/packages/datagrams/

For UDP, Envoy receives UDP packages from the downstream, and uses its own IP address as the sender IP address when
proxying the UDP packages to the upstream.

In this mode, the upstream will see Envoy's IP address.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and port.

For TCP, Envoy terminates the downstream connection, connects the upstream with the downstream IP address, and proxies
the TCP traffic from the downstream to the upstream.

For UDP, Envoy receives UDP packages from the downstream, and uses the downstream IP address as the sender IP address
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/packages/datagrams/

the TCP traffic from the downstream to the upstream.

For UDP, Envoy receives UDP packages from the downstream, and uses the downstream IP address as the sender IP address
when proxying the UDP packages to the upstream.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/packages/datagrams/

For UDP, Envoy receives UDP packages from the downstream, and uses the downstream IP address as the sender IP address
when proxying the UDP packages to the upstream.

In this mode, the upstream will see the original downstream IP address.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and Envoy's mac address.

The upstream can see the original source IP, but the original port number won't be passed, so the return
traffic from the upstream must be routed back to Envoy because only Envoy knows how to send the return traffic back
to the right port number of the downstream, which requires routing at the upstream side to be set up.
In a Kubernetes cluster, Envoy Gateway will have to carefully cooperate with CNI plugins to get the routing right.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you create and link an issue that will be used to capture the details of integrating transparent proxy mode with the kube network.

@arkodg arkodg merged commit f751581 into envoyproxy:main Nov 7, 2022
@zhaohuabing
Copy link
Copy Markdown
Member Author

Thank you @danehans for reviewing this. I'll address these comments in another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants