Skip to content

Commit 28f0c3c

Browse files
committed
fix traffic flow to show nginx routes directly to pods not services
- Update mermaid diagrams to show direct pod routing - Add note that services are used for pod information gathering - Update sequence diagram to remove service intermediary - Update process descriptions to show pods reply directly - Add exhaustive disclaimer to resource creation list
1 parent 303fa0e commit 28f0c3c

File tree

2 files changed

+30
-39
lines changed

2 files changed

+30
-39
lines changed

docs/architecture/gateway-lifecycle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Validation Checks:
6161
### 3. Kubernetes Resources Created
6262

6363
```text
64-
Resources Created:
64+
Resources Created (not exhaustive):
6565
├── Deployment: nginx-gateway-{gateway-name}
6666
├── Service: nginx-gateway-{gateway-name}
6767
├── ConfigMap: nginx-config-{gateway-name}

docs/architecture/traffic-flow.md

Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This diagram shows how user requests travel through NGINX Gateway Fabric.
44

55
## Simple Overview
66

7+
**Note:** NGINX routes traffic directly to Pods. Services are used for Pod information gathering, not as routing intermediaries.
8+
79
```mermaid
810
%%{init: {'theme':'dark', 'themeVariables': {'fontSize': '16px', 'darkMode': true, 'primaryColor': '#4f46e5', 'primaryTextColor': '#e5e7eb', 'primaryBorderColor': '#6b7280', 'lineColor': '#9ca3af', 'secondaryColor': '#1f2937', 'tertiaryColor': '#374151', 'background': '#111827', 'mainBkg': '#1f2937', 'secondBkg': '#374151', 'tertiaryTextColor': '#d1d5db'}}}%%
911
graph LR
@@ -22,13 +24,11 @@ graph LR
2224
end
2325
end
2426
25-
%% Simple flow
27+
%% Simple flow - NGINX routes directly to Pods
2628
USER --> NGINX
27-
NGINX --> SVC1
28-
NGINX --> SVC2
29-
SVC1 --> POD1
30-
SVC1 --> POD2
31-
SVC2 --> POD3
29+
NGINX --> POD1
30+
NGINX --> POD2
31+
NGINX --> POD3
3232
3333
%% Dark-friendly styling
3434
style USER fill:#fbbf24,stroke:#f59e0b,stroke-width:2px,color:#1f2937
@@ -54,15 +54,15 @@ User Request:
5454
```text
5555
NGINX Gateway:
5656
├── Receives request from user
57-
├── Applies SSL termination
57+
├── Applies SSL termination (only if a user configures it to do so)
5858
├── Matches routing rules
59-
└── Selects backend service
59+
└── Selects backend pod
6060
```
6161

62-
### 3. Service Processes Request
62+
### 3. Pod Processes Request
6363

6464
```text
65-
Backend Service:
65+
Backend Pod:
6666
├── Receives request from NGINX
6767
├── Processes business logic
6868
├── Queries database (if needed)
@@ -74,7 +74,7 @@ Backend Service:
7474

7575
```text
7676
Response Flow:
77-
├── Service → NGINX
77+
├── Pod → NGINX
7878
├── NGINX → User
7979
└── Request complete
8080
```
@@ -86,54 +86,45 @@ Response Flow:
8686
sequenceDiagram
8787
participant User
8888
participant NGINX
89-
participant Service as Backend Service
9089
participant Pod
9190
9291
User->>NGINX: HTTP Request
9392
NGINX->>NGINX: Route matching
94-
NGINX->>Service: Proxy to service
95-
Service->>Pod: Forward to pod
93+
NGINX->>Pod: Proxy directly to pod
9694
Pod->>Pod: Process request
97-
Pod->>Service: Return response
98-
Service->>NGINX: Response
95+
Pod->>NGINX: Return response
9996
NGINX->>User: HTTP Response
10097
```
10198

10299
## Request Routing Logic
103100

104-
### Path-Based Routing
105-
106-
```nginx
107-
# Generated from HTTPRoute resources
108-
location /users {
109-
proxy_pass http://user-service;
110-
}
111-
112-
location /orders {
113-
proxy_pass http://order-service;
114-
}
115-
116-
location /products {
117-
proxy_pass http://product-service;
118-
}
119-
```
120-
101+
Routes use both hostname and path for traffic routing decisions.
121102

122-
### Host-Based Routing
103+
### Combined Host and Path Routing
123104

124105
```nginx
125-
# Different hosts route to different services
106+
# Routes combine hostname and path matching
126107
server {
127108
server_name api.example.com;
128-
location / {
129-
proxy_pass http://api-service;
109+
110+
location /users {
111+
proxy_pass http://user-service;
112+
}
113+
114+
location /orders {
115+
proxy_pass http://order-service;
130116
}
131117
}
132118
133119
server {
134120
server_name admin.example.com;
135-
location / {
121+
122+
location /dashboard {
136123
proxy_pass http://admin-service;
137124
}
125+
126+
location /settings {
127+
proxy_pass http://config-service;
128+
}
138129
}
139130
```

0 commit comments

Comments
 (0)