From d9e6d94ac719495273b48068c68cc9ca4bda56e5 Mon Sep 17 00:00:00 2001 From: salonichf5 <146118978+salonichf5@users.noreply.github.com> Date: Thu, 23 Oct 2025 11:14:27 -0600 Subject: [PATCH 1/3] goals and non-goals for session persistence --- docs/proposals/session-persistence.md | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/proposals/session-persistence.md diff --git a/docs/proposals/session-persistence.md b/docs/proposals/session-persistence.md new file mode 100644 index 0000000000..805b590596 --- /dev/null +++ b/docs/proposals/session-persistence.md @@ -0,0 +1,31 @@ +# Enhancement Proposal-4051: Session Persistence for NGINX Plus and OSS + +- Issue: https://github.com/nginx/nginx-gateway-fabric/issues/4051 +- Status: Provisional + +## Summary + +This enhancement proposal extends the Upstream Settings Policy API to support session persistence for both NGINX Plus and NGINX OSS. It enables application developers to configure basic session persistence using `ip_hash` for OSS and cookie-based session persistence for NGINX Plus. + +## Goals + +- Extend Upstream Settings Policy API to support session persistence. + +## Non-Goals + +- Provide implementation details for enabling session persistence. +- Support session persistence for TLSRoute or other Layer 4 routes. + +## Introduction + +### Extension of Upstream Settings Policy API + + +- explain API +- How it works for OSS and Plus +- Describe directives +- directive contraints +- sample config + +Apps using session persistence must account for aspects like load shedding, draining, and session migration as a part of their application design. + From c13238106ca7cf442e14da307fefb21884343e7a Mon Sep 17 00:00:00 2001 From: salonichf5 <146118978+salonichf5@users.noreply.github.com> Date: Mon, 27 Oct 2025 14:46:49 -0700 Subject: [PATCH 2/3] update goals and non goals for session persistence --- docs/proposals/session-persistence.md | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/docs/proposals/session-persistence.md b/docs/proposals/session-persistence.md index 805b590596..f4ce1c824c 100644 --- a/docs/proposals/session-persistence.md +++ b/docs/proposals/session-persistence.md @@ -5,27 +5,21 @@ ## Summary -This enhancement proposal extends the Upstream Settings Policy API to support session persistence for both NGINX Plus and NGINX OSS. It enables application developers to configure basic session persistence using `ip_hash` for OSS and cookie-based session persistence for NGINX Plus. +Enable NGINX Gateway Fabric to support session persistence for both NGINX Plus and NGINX OSS, allowing application developers to configure basic session persistence using the `ip_hash` load balancing method in OSS and cookie-based session persistence in NGINX Plus. ## Goals -- Extend Upstream Settings Policy API to support session persistence. +- Extend the Upstream Settings Policy API to allow specifying a load balancing method to support basic session persistence. +- Design the translation of the Gateway API `sessionPersistence` specification, which can be configured on both HTTPRoute and GRPCRoute, into NGINX Plus cookie-based session persistence directives with `secure` and `httpOnly` mode enforced by default. ## Non-Goals -- Provide implementation details for enabling session persistence. -- Support session persistence for TLSRoute or other Layer 4 routes. +- Describe or implement low-level configuration details for enabling session persistence. +- Extend session persistence support to TLSRoutes or other Layer 4 route types. +- Supporting the `sameSite` cookie directive for NGINX Plus session persistence, which may be considered in the future as the Gateway API `sessionPersistence` specification evolves. -## Introduction - -### Extension of Upstream Settings Policy API - - -- explain API -- How it works for OSS and Plus -- Describe directives -- directive contraints -- sample config - -Apps using session persistence must account for aspects like load shedding, draining, and session migration as a part of their application design. +## Useful Links +- Session Persistence [specification](https://gateway-api.sigs.k8s.io/reference/spec/#sessionpersistence). +- Extended Session Persistence [GEP](https://gateway-api.sigs.k8s.io/geps/gep-1619). +- RFC standard for [Set-Cookie](https://datatracker.ietf.org/doc/html/rfc6265#section-4.1) header. From 84d5897eff472011993752ac2deb1bcca23f50b4 Mon Sep 17 00:00:00 2001 From: salonichf5 <146118978+salonichf5@users.noreply.github.com> Date: Mon, 27 Oct 2025 16:50:04 -0700 Subject: [PATCH 3/3] specify LB method --- docs/proposals/session-persistence.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/proposals/session-persistence.md b/docs/proposals/session-persistence.md index f4ce1c824c..85f42b8a6c 100644 --- a/docs/proposals/session-persistence.md +++ b/docs/proposals/session-persistence.md @@ -9,7 +9,7 @@ Enable NGINX Gateway Fabric to support session persistence for both NGINX Plus a ## Goals -- Extend the Upstream Settings Policy API to allow specifying a load balancing method to support basic session persistence. +- Extend the Upstream Settings Policy API to allow specifying `ip_hash` load balancing method to support basic session persistence. - Design the translation of the Gateway API `sessionPersistence` specification, which can be configured on both HTTPRoute and GRPCRoute, into NGINX Plus cookie-based session persistence directives with `secure` and `httpOnly` mode enforced by default. ## Non-Goals