Repository navigation
Replies: 5 comments 14 replies
As an application developer I would prefer the To me It also makes it more obvious, as this controls the routing of the request (whereas the BackendTraficPolicy to me controls more of the "how" things about the requests, rather than the routing (ie timeout and retries do not change which pod a request is forwarded to, they change the characteristics of that request)
We currently have no such requirements |
|
#4713 is potentially a use case where session persistence in BackendTrafficPolicy would be the safer approach |
|
Another point I have just started exploring is: mesh. I'm new to mesh, so full disclosure, I might get some of the details wrong. When it comes to producer or consumer routes, having 2 ways to configure session persistence in north-south becomes 3 ways (producer route, consumer route, BackendTrafficPolicy). To be clear, session persistence always configures the behavior of clients when targeting a service while the producer vs. consumer routes in mesh determine who is allowed to configure it and what the scope is. Interestingly enough, the behavior of using a producer route with session persistence is pretty much identical as using BackendTrafficPolicy with session persistence targeting that service. Both say "all traffic to my service gets persistence". So for mesh, if we keep both, implementations are looking at a potential 3-way merge of session persistence configuration. Or, we need to restrict mesh to only one of these attachment points. This makes me wonder if the complexity we're going to hit in mesh is actually pointing at something in the north-south design too. Is a 3-way merge a complexity deal breaker? Does the API need to work cleanly for both north-south and mesh, or is it okay to ship something that our mesh API would have to carve out parts of? If it doesn't work cleanly for mesh, is this a proper "litmus test" that our attachment model is problematic? CC: @mikemorris @kflynn maybe you could help me make sense of mesh here. |
|
The more I think about Backend (see #4488), the more I think that we should push towards putting this config into Backend, as it has the advantages of Service attachment (since Backend is effectively a Service replacement and wrapper), while avoiding the disadvantages of having to use a Policy (because the reference is inlined inside the Route). That would make this a little slower, since we can't just move forward with what we have, but if we're going to end up with a Backend resource anyway (which seems likely), I'd rather end up with one place to configure this, rather than two (Backend and Policy, or Backend and filter). |
|
For NGF, we currently implement route-inline session persistence and derive the cookie Path from the matched route path (longest common segment-prefix across matches in a rule). Cookie path default Defaulting Worth being explicit in the GEP that NGF currently ships route-inline, so removing it is a regression on our side and a migration story for our users. I'm new to the GEP graduation process, is the typical path to keep route-inline in Experimental for a release or two while BackendTrafficPolicy graduates, and deprecate once the migration story is in place? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Update: The community has decided to champion the Backend resource as the primary attachment point for session persistence. Route-inline and BackendTrafficPolicy session persistence will be deprecated in #4876. Adding session persistence to Backend is pending Backend supporting Service/EndpointSelector bindings.
As a follow-up to the Jan 27 Community Call, I wanted to discuss whether we still need two places to configure session persistence, and which one we should champion.
Background
Session Persistence can be configured in two places:
HTTPRoute&GRPCRoute)BackendTrafficPolicy(PreviouslyBackendLBPolicy)The historic reason we enabled two approaches is that some implementations (cloud-based implementations like GKE) requested modeling the API as an attachment to the service, while most implementations preferred the inline route rule API. We settled on pursuing both APIs for experimental to get signal from implementations on what works best.
Current State
A quick scan of implementations shows that most have focused on the Route Rule API so far, with no implementations having implemented
BackendTrafficPolicysession persistence yet.GEP-1619 still needs updates related to naming collisions and specifying path behavior as discussed in #4268. I'm working on these updates in #4649.
Pros/Cons
Route Rule Session Persistence API:
BackendTrafficPolicy Session Persistence API:
Backend Session Persistence API:
backendRef, no separate policy to findCons of Multiple Attachment Points:
What Removing One Attachment Point Would Mean
If we remove route-inline:
If we remove BackendTrafficPolicy:
Potential Paths Forward
What feedback would be most helpful:
BackendTrafficPolicyor Route-Inline API essential for your use case?All reactions