Replies: 4 comments 2 replies
-
Relates/overlaps with #2618 |
Beta Was this translation helpful? Give feedback.
-
I can see how this would be useful in this example, but I question the use of ExtensionRefs for the implementation. From what I understand, ExtensionRef should be available for custom implementations, not for functionality that we expect to be universally useful. Incorporating a brand-new field would be better. For example, NGINX+ and F5 do TCP/UDP load balancing by grouping backend servers into a resource (upstream group, or origin pools) and applying LB configuration to that resource. You're probably talking about more than just LB functionality, so in an effort to simplify the requested functionality here, a longer list of use cases would be helpful. There may be more use cases for TCP route than UDP route, as well, so focusing on one at a time could be helpful. |
Beta Was this translation helpful? Give feedback.
-
In my opinion this also relates to #2628. In general does the Gateway API want to add extensionRefs/filters to every place that may need extra functionality, or lean into policies or another such mechanism. |
Beta Was this translation helpful? Give feedback.
-
This is a very interesting proposal. When I first looked at it, I'd assumed it was analogous to the ExtensionRef filter we already have on HTTPRoute, but this is actually entirely different - a custom matcher... I've got mixed feelings on this. On the one hand, we have no matching logic in either of these routes today (thus #2618), on the other, why included a Route in upstream Gateway API if all of the matching logic is going to be implementation-specific? Would it better to just have an implementation-specific SSHRoute to handle your specific example? I can see the value in extensions when they augment something significant. For example, HTTPRoute has a lot of capabilities, and some implementations may just want to add one custom filter to the otherwise portable set of capabilities. In the case of TCP/UDPRoute there's not really any substance yet, so I think it's harder to make the case for an ExtensionRef vs just an implementation-specific Route type. |
Beta Was this translation helpful? Give feedback.
-
Problem
At the moment, the
TCPRoute
andUDPRoute
APIs are very simple, with the API allowing for only a list of backends to be specified that will receive incoming traffic. In contrast,HTTPRoute
offers a plethora of ways to match and modify incoming/outgoing traffic. This is obvious, since HTTP is a L7 protocol and thus has much more data to work with. Since TCP and UDP are L4 protocols, there aren't any obvious ways to provide standardized traffic matchers and filters.Proposal
But
HTTPRoute
also allows for custom filters and matchers through the.extensionRef
field which points to another object that contains more details about the required operations. We could add the same capability toTCPRoute
andUDPRoute
. This would allow for implementations to offer their own TCP and UDP traffic extensions, which could then be referred to in aTCPRoute
/UDPRoute
object.For example, consider we want to build a custom SSH load balancer. Adding such an extension capability, will then allow redirecting a particular user to a particular backend based on their SSH username. Such behavior is not possible to implement through the existing APIs. Here's a basic example of what this would look like:
Since extensions are completely optional, the
extensionRef
field can be introduced without any friction while enabling implementations to have custom behavior like above.Beta Was this translation helpful? Give feedback.
All reactions