Skip to content

Commit dfcdf5b

Browse files
arihantgk8s-ci-robot
authored andcommitted
Removed API section and add examples of load balancers using subnet mask to implement session persistence
1 parent ff7e2e8 commit dfcdf5b

File tree

1 file changed

+10
-60
lines changed

1 file changed

+10
-60
lines changed

geps/gep-3798/index.md

Lines changed: 10 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
### What
1111
This GEP proposes the addition of Client IP-based session persistence to the Gateway API. This feature will allow Gateway API implementations to ensure that requests originating from a specific client IP address (or a subnet defined by an IP mask) are consistently routed to the same backend endpoint for a configurable duration. This aims to provide a standardized and centralized mechanism for client IP persistence across various Gateway API implementations.
1212

13+
As mentioned in the [GEP-1619](https://gateway-api.sigs.k8s.io/geps/gep-1619/#api), `SessionPersistence` can be applied via `BackendLBPolicy` and `RouteRule` API. Similar [edge case behaviour](https://gateway-api.sigs.k8s.io/geps/gep-1619/#edge-case-behavior) and [API Granularity](https://gateway-api.sigs.k8s.io/geps/gep-1619/#api-granularity) for ClientIP Persistence type should be applicable as well.
14+
1315
## Goals
1416

1517
* Define an API extension within Gateway API to enable client IP-based session persistence.
@@ -52,66 +54,7 @@ This GEP addresses these issues by providing a first-class API mechanism for cli
5254

5355
## API
5456

55-
As mentioned in the [GEP-1619](https://gateway-api.sigs.k8s.io/geps/gep-1619/#api), `SessionPersistence` can be applied via `BackendLBPolicy` and `RouteRule` API .Similar [edge case behaviour](https://gateway-api.sigs.k8s.io/geps/gep-1619/#edge-case-behavior) and [API Granularity](https://gateway-api.sigs.k8s.io/geps/gep-1619/#api-granularity) for ClientIP Persistence type should be applicable as well.
56-
57-
Requirement is to introduce a new `SessionPersistenceType` called `ClientIP`
58-
59-
Example (illustrative, exact field names and structure are subject to review):
60-
61-
```
62-
# Existing SessionPersistence (simplified for example)
63-
# apiVersion: gateway.networking.k8s.io/v1beta1
64-
# kind: HTTPRoute
65-
66-
spec:
67-
rules:
68-
- backendRefs:
69-
- name: my-service
70-
port: 80
71-
sessionPersistence:
72-
# New field for client IP based persistence
73-
type: "ClientIP"
74-
absoluteTimeout: "5m"
75-
ipMask: 24 # Optional: IP mask for subnet persistence (e.g., "24" for /24 subnet)
76-
```
77-
```
78-
type SessionPersistence struct {
79-
...
80-
81-
// IPMask defines the IP mask to be applied on client this may be
82-
// used to persist clients from a same subnet to stick to same session
83-
//
84-
// Support: Implementation-specific
85-
//
86-
// +optional
87-
// +kubebuilder:validation:Minimum=0
88-
// +kubebuilder:validation:Maximum=128
89-
IPMask *uint32 `json:"ipMask,omitempty"`
90-
91-
}
92-
93-
type SessionPersistenceType string
94-
95-
const (
96-
// CookieBasedSessionPersistence specifies cookie-based session
97-
// persistence.
98-
//
99-
// Support: Core
100-
CookieBasedSessionPersistence SessionPersistenceType = "Cookie"
101-
102-
// HeaderBasedSessionPersistence specifies header-based session
103-
// persistence.
104-
//
105-
// Support: Extended
106-
HeaderBasedSessionPersistence SessionPersistenceType = "Header"
107-
108-
// ClientIPBasedSessionPersistence specifies Client IP based session
109-
// persistence.
110-
//
111-
// Support: Implementation-specific
112-
ClientIPBasedSessionPersistence SessionPersistenceType = "ClientIP"
113-
)
114-
```
57+
TBD
11558

11659
### Conformance tests
11760

@@ -128,3 +71,10 @@ Below are references showing how ClientIP persistence is currently supported acr
12871
* [AVI](https://techdocs.broadcom.com/us/en/vmware-security-load-balancing/avi-load-balancer/avi-load-balancer/30-2/load-balancing-overview/persistence.html)
12972
* [Native k8s](https://kubernetes.io/docs/reference/networking/virtual-ips/#session-affinity)
13073

74+
Below are some implementations of ClientIP persistence which allows configuring subnet Mask
75+
76+
* [F5](https://techdocs.f5.com/content/kb/en-us/products/big-ip_ltm/manuals/product/ltm-concepts-11-5-1/11.html#:~:text=is%20persisted%20properly.-,Source%20address%20affinity%20persistence,-Source%20address%20affinity)
77+
* [Fortinet](https://help.fortinet.com/fadc/4-8-0/olh/Content/FortiADC/handbook/slb_persistence.htm)
78+
* [Huwaei](https://info.support.huawei.com/hedex/api/pages/EDOC1100149308/AEJ0713J/18/resources/cli/session_persistence.html)
79+
* [NetScaler](https://docs.netscaler.com/en-us/citrix-adc/current-release/load-balancing/load-balancing-persistence/no-rule-persistence#:~:text=For%20IP%2Dbased%20persistence%2C%20you%20can%20also%20set%20the%20persistMask%20parameter)
80+
* [AVI](https://techdocs.broadcom.com/us/en/vmware-security-load-balancing/avi-load-balancer/avi-load-balancer/30-2/load-balancing-overview/persistence/client-ip-persistence.html)

0 commit comments

Comments
 (0)