You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
9
+
10
+
## Goals
11
+
12
+
- Extend the Upstream Settings Policy API to allow specifying `ip_hash` load balancing method to support basic session persistence.
13
+
- 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.
14
+
15
+
## Non-Goals
16
+
17
+
- Describe or implement low-level configuration details for enabling session persistence.
18
+
- Extend session persistence support to TLSRoutes or other Layer 4 route types.
19
+
- Supporting the `sameSite` cookie directive for NGINX Plus session persistence, which may be considered in the future as the Gateway API `sessionPersistence` specification evolves.
If you configured BackendTLSPolicy in step 5, NGF will establish HTTPS connections to the external service. The client connection remains HTTP, but the backend connection uses HTTPS:
You should see a JSON response from httpbin.org via HTTPS.
193
+
194
+
## How It Works
195
+
196
+
This example demonstrates key features for routing to external services:
197
+
198
+
1.**DNS Resolution**: The NginxProxy resource configures DNS resolvers (8.8.8.8, 1.1.1.1) so NGINX can resolve external hostnames
199
+
2.**Host Header Handling**: NGF automatically detects ExternalName services and sets the `Host` header to the external hostname (`httpbin.org`) instead of the Gateway hostname (`cafe.example.com`), ensuring external services receive the correct Host header
200
+
3.**URL Rewriting**: The URLRewrite filter strips the `/external` prefix before proxying to httpbin.org, so `/external/get` becomes `/get` on the external service
201
+
4.**Mixed Routing**: The same HTTPRoute can route to both ExternalName services and internal Kubernetes services seamlessly
202
+
5.**HTTPS Backends**: BackendTLSPolicy enables secure HTTPS connections to external services while allowing HTTP-level routing based on paths, headers, etc.
203
+
6.**TLS Passthrough**: The TLSRoute allows direct TLS connections to external services without termination at the Gateway (no HTTP-level routing)
0 commit comments