Skip to content

Commit 3ee65f6

Browse files
authored
ClientSettingsPolicy Enhancement Proposal (#1692)
Problem: Need design for specifying client settings like client_max_body_size Solution: Add enhancement proposal introducing ClientSettingsPolicy.
1 parent 25cc818 commit 3ee65f6

18 files changed

+450
-2
lines changed

docs/developer/mapping.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Mapping Gateway API Resources to NGINX Contexts
2+
3+
This document shows how NGINX Gateway Fabric maps Gateway API resources to NGINX contexts. Below are the three types of possible mappings (simplified for brevity):
4+
5+
**A. Distinct Hostnames**
6+
7+
![map-a](/docs/images/mapping/mapping-a.png)
8+
9+
When each HTTPRoute attached to a Gateway has a distinct set of hostnames, NGINX Gateway Fabric will generate a server block for each hostname. All the locations contained in the server block belong to a single HTTPRoute.
10+
In this scenario, each server block is "owned" by a single HTTPRoute.
11+
12+
> Note: This mapping only applies to "Exact" path matches. Some "PathPrefix" path matches will generate an additional location block to handle prefix matching.
13+
14+
**B. Same Hostname**
15+
16+
![map-b](/docs/images/mapping/mapping-b.png)
17+
18+
When HTTPRoutes attached to a Gateway specify the same hostname, NGINX Gateway Fabric generates a single server block containing the locations from all HTTPRoutes that specify the server's hostname.
19+
In this scenario, the HTTPRoutes share "ownership" of the server block.
20+
21+
**C. Internal Redirect**
22+
23+
![map-c](/docs/images/mapping/mapping-c.png)
24+
25+
When HTTPRoutes attached to a Gateway specify the same hostname _and_ path, NGINX Gateway Fabric will generate a single server block and a single (external) location for that path. In addition, it will generate one named location block -- only used for internal requests -- per HTTPRoute match rule.
26+
The external location will offload the routing decision to an NGINX JavaScript (NJS) function that will route the request to the appropriate named location.
27+
In this scenario, the HTTPRoutes share "ownership" of the server block and the external location block.
15.4 KB
Loading
12.1 KB
Loading
97.9 KB
Loading
95.2 KB
Loading
76.2 KB
Loading
125 KB
Loading
85.6 KB
Loading
69.9 KB
Loading
118 KB
Loading

0 commit comments

Comments
 (0)