Repository navigation
EXP: TCPRoute GEP - #4783
EXP: TCPRoute GEP#4783
Conversation
| ## TLDR | ||
|
|
||
| Gateway API needs a first-class Route type for TCP because a meaningful class of Kubernetes workloads cannot be represented by the standard Gateway API routing model without it. | ||
| HTTPRoute only addresses a single class of TCP-based traffic (HTTP/1.1 and HTTP/2 over TCP), leaving the broader universe of TCP workloads without a portable routing API. |
There was a problem hiding this comment.
maybe a nit, but a user wanting a full TCP stream but that can rely on encrypted frontend traffic can use TLSRoute. The TCPRoute is intended for folks that cannot solve their needs with HTTP/GRPCRoute nor TLSRoute
There was a problem hiding this comment.
| HTTPRoute only addresses a single class of TCP-based traffic (HTTP/1.1 and HTTP/2 over TCP), leaving the broader universe of TCP workloads without a portable routing API. | |
| HTTPRoute only addresses a single class of TCP-based traffic (HTTP/1.1 and HTTP/2 over TCP), and TLSRoute handles routing via SNI, leaving the broader universe of TCP workloads that don't work in either of those cases without a portable routing API. |
How about this?
| - A Gateway has multiple TCP listeners: `postgres` on port 5432 and `kafka` on port 9092 | ||
| - A TCPRoute specifies a `parentRef` with only the Gateway name (no `sectionName` or `port`) | ||
|
|
||
| - The TCPRoute is accepted with the following status: |
There was a problem hiding this comment.
We may want also to be explicit about the connectivity tests (this can be done on the experimental GEP): what happens when I connect to one or other listener
There was a problem hiding this comment.
Yes, as on UDPRoute, I think it may be important to be clear that, when a TCPRoute does this, it effectively multiplexes the Listener ports onto a single port on the backend.
|
I broadly agree with @rikatz's comments here. Looks good otherwise though, I'd just like to see the requested bit of clarification in the goals before landing this. |
| 1. TCPRoute with multiple weighted backends distributes connections according to configured weights | ||
| - A Gateway has a TCP listener named `kafka` on port 9092 | ||
| - A TCPRoute specifies a `parentRef` with `sectionName: kafka` and multiple `backendRefs`: | ||
| - `kafka-broker-1` with `weight: 70` | ||
| - `kafka-broker-2` with `weight: 30` | ||
|
|
||
| - The TCPRoute is accepted with the following status: | ||
|
|
||
| ``` | ||
| parents: | ||
| - parentRef: | ||
| group: gateway.networking.k8s.io | ||
| kind: Gateway | ||
| name: tcp-gateway | ||
| sectionName: kafka | ||
| conditions: | ||
| - type: Accepted | ||
| status: "True" | ||
| reason: Accepted | ||
| - type: ResolvedRefs | ||
| status: "True" | ||
| reason: ResolvedRefs | ||
| ``` | ||
|
|
||
| - TCP connections sent to port 9092 are distributed across backends respecting the configured weights (approximately 70% to `kafka-broker-1` and 30% to `kafka-broker-2`). | ||
|
|
||
| Conformance Level: **Core** |
There was a problem hiding this comment.
It may be important to specify what defines a TCP connection (that is, to say that, yes that means a full TCP connection including everything up until the FIN or RST).
|
Couple of small things, but aside from that, this LGTM for Provisional, and tbh is pretty close to Experimental anyway. |
7d83a9f to
b1d542e
Compare
|
Addressed the comments. |
|
@zac-nixon can't see changes from the last commit, seems you missed to push the changes. Thanks! |
|
/retest |
|
|
||
| - TCP connections sent to port 9092 are distributed across backends respecting the configured weights (approximately 70% to `kafka-broker-1` and 30% to `kafka-broker-2`). In this situation, TCP SYN packets denote one connection for weighting purposes. | ||
|
|
||
| Conformance Level: **Core** |
There was a problem hiding this comment.
this conformance level should be "Extended"
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rikatz, zac-nixon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
bd395dd to
9775551
Compare
|
Fine for Provisional, let's get on to pushing this towards Standard. /lgtm |
|
/hold cancel Thanks @zac-nixon |
/kind gep
What this PR does / why we need it:
Backfills TCPRoute GEP
Which issue(s) this PR fixes:
#2644
Does this PR introduce a user-facing change?: