Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b69fe1f

Browse files
authoredDec 7, 2023
Merge branch 'main' into docs/api-compatibility-review
2 parents b656a3c + 21a2507 commit b69fe1f

File tree

33 files changed

+2539
-41
lines changed

33 files changed

+2539
-41
lines changed
 

‎.github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
* @nginxinc/nginx-gateway-fabric
2+
/site/ @nginxinc/nginx-gateway-fabric @nginxinc/nginx-docs
3+
/docs/ @nginxinc/nginx-gateway-fabric @nginxinc/nginx-docs

‎.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3535

3636
- name: Setup Golang Environment
37-
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
37+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
3838
with:
3939
go-version-file: go.mod
4040

@@ -63,7 +63,7 @@ jobs:
6363
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6464

6565
- name: Setup Golang Environment
66-
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
66+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
6767
with:
6868
go-version-file: go.mod
6969

@@ -105,7 +105,7 @@ jobs:
105105
fetch-depth: 0
106106

107107
- name: Setup Golang Environment
108-
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
108+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
109109
with:
110110
go-version-file: go.mod
111111

‎.github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
# queries: security-extended,security-and-quality
5656

5757
- name: Setup Golang Environment
58-
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
58+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
5959
with:
6060
go-version-file: go.mod
6161
if: matrix.language == 'go'

‎.github/workflows/conformance.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3737

3838
- name: Setup Golang Environment
39-
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
39+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
4040
with:
4141
go-version-file: go.mod
4242

‎.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2323

2424
- name: Setup Golang Environment
25-
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
25+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
2626
with:
2727
go-version-file: go.mod
2828

‎site/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ build-dev:
8989
hugo --gc -e development
9090

9191
deploy-preview: hugo-mod
92-
hugo --gc -b ${NETLIFY_DEPLOY_URL}
92+
hugo --gc -b ${NETLIFY_DEPLOY_URL}/nginx-gateway-fabric/

‎site/config/_default/config.toml

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
title = "NGINX Gateway Fabric"
22
enableGitInfo = false
33
baseURL = "/"
4-
publishDir = "public/nginx-gateway-fabric"
54
staticDir = ["static"]
65
languageCode = "en-us"
76
description = "NGINX Gateway Fabric."

‎site/config/development/config.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
baseURL = "https://docs-dev.nginx.com/nginx-gateway-fabric"
22
title = "DEV -- NGINX Gateway Fabric"
3+
publishDir = "public/nginx-gateway-fabric"
34
canonifyURLs = false

‎site/config/production/config.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
baseURL = "/nginx-gateway-fabric"
22
title = "NGINX Gateway Fabric"
3+
publishDir = "public/nginx-gateway-fabric"
34
canonifyURLs = false

‎site/config/staging/config.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
baseURL = "https://docs-staging.nginx.com/nginx-gateway-fabric"
22
title = "STAGING -- NGINX Gateway Fabric"
3+
publishDir = "public/nginx-gateway-fabric"
34
canonifyURLs = false

‎site/netlify.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[build]
22
base = "site/"
33
publish = "public"
4+
command = "hugo --gc -b $DEPLOY_PRIME_URL/nginx-gateway-fabric"
45

56
[context.production]
67
command = "make all"

‎tests/graceful-recovery/graceful-recovery.md

+19-30
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ Ensure that NGF can recover gracefully from container failures without any user
3434
3. Check out the latest tag (unless you are installing the edge version from the main branch).
3535
4. Go into `deploy/manifests/nginx-gateway.yaml` and change `runAsNonRoot` from `true` to `false`.
3636
This allows us to insert our ephemeral container as root which enables us to restart the nginx-gateway container.
37-
5. Follow the [installation instructions](https://github.com/nginxinc/nginx-gateway-fabric/blob/main/docs/installation.md)
37+
5. Follow the [installation instructions](https://github.com/nginxinc/nginx-gateway-fabric/blob/main/site/content/installation/installing-ngf/manifests.md)
3838
to deploy NGINX Gateway Fabric using manifests and expose it through a LoadBalancer Service.
3939
6. In a separate terminal track NGF logs.
4040

4141
```console
42-
kubectl -n nginx-gateway logs -f deploy/nginx-gateway
42+
kubectl -n nginx-gateway logs -f deploy/nginx-gateway -c nginx-gateway
4343
```
4444

4545
7. In a separate terminal track NGINX container logs.
4646

4747
```console
48-
kubectl -n nginx-gateway logs -f <NGF_POD> -c nginx
48+
kubectl -n nginx-gateway logs -f deploy/nginx-gateway -c nginx
4949
```
5050

5151
8. In a separate terminal Exec into the NGINX container inside the NGF pod.
@@ -56,9 +56,7 @@ to deploy NGINX Gateway Fabric using manifests and expose it through a LoadBalan
5656

5757
9. In a different terminal, deploy the
5858
[https-termination example](https://github.com/nginxinc/nginx-gateway-fabric/tree/main/examples/https-termination).
59-
10. Inside the NGINX container, navigate to `/etc/nginx/conf.d` and check `http.conf` and `config-version.config` to see
60-
if the configuration and version were correctly updated.
61-
11. Send traffic through the example application and ensure it is working correctly.
59+
10. Send traffic through the example application and ensure it is working correctly.
6260

6361
### Run the tests
6462

@@ -80,25 +78,22 @@ if the configuration and version were correctly updated.
8078
4. Check for errors in the NGF and NGINX container logs.
8179
5. When the nginx-gateway container is back up, ensure traffic flows through the example application correctly.
8280
6. Open up the NGF and NGINX container logs and check for errors.
83-
7. Inside the NGINX container, check that `http.conf` was not changed and `config-version.conf` had its version set to `2`.
84-
8. Send traffic through the example application and ensure it is working correctly.
85-
9. Check that NGF can still process changes of resources.
81+
7. Send traffic through the example application and ensure it is working correctly.
82+
8. Check that NGF can still process changes of resources.
8683
1. Delete the HTTPRoute resources.
8784

8885
```console
8986
kubectl delete -f ../../examples/https-termination/cafe-routes.yaml
9087
```
9188

92-
2. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
93-
3. Send traffic through the example application using the updated resources and ensure traffic does not flow.
94-
4. Apply the HTTPRoute resources.
89+
2. Send traffic through the example application using the updated resources and ensure traffic does not flow.
90+
3. Apply the HTTPRoute resources.
9591

9692
```console
9793
kubectl apply -f ../../examples/https-termination/cafe-routes.yaml
9894
```
9995

100-
5. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
101-
6. Send traffic through the example application using the updated resources and ensure traffic flows correctly.
96+
4. Send traffic through the example application using the updated resources and ensure traffic flows correctly.
10297

10398
#### Restart NGINX container
10499

@@ -113,24 +108,21 @@ if the configuration and version were correctly updated.
113108

114109
4. When NGINX container is back up, ensure traffic flows through the example application correctly.
115110
5. Open up the NGINX container logs and check for errors.
116-
6. Exec back into the NGINX container and check that `http.conf` and `config-version.conf` were not changed.
117-
7. Check that NGF can still process changes of resources.
111+
6. Check that NGF can still process changes of resources.
118112
1. Delete the HTTPRoute resources.
119113

120114
```console
121115
kubectl delete -f ../../examples/https-termination/cafe-routes.yaml
122116
```
123117

124-
2. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
125-
3. Send traffic through the example application using the updated resources and ensure traffic does not flow.
126-
4. Apply the HTTPRoute resources.
118+
2. Send traffic through the example application using the updated resources and ensure traffic does not flow.
119+
3. Apply the HTTPRoute resources.
127120

128121
```console
129122
kubectl apply -f ../../examples/https-termination/cafe-routes.yaml
130123
```
131124

132-
5. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
133-
6. Send traffic through the example application using the updated resources and ensure traffic flows correctly.
125+
4. Send traffic through the example application using the updated resources and ensure traffic flows correctly.
134126

135127
#### Restart Node with draining
136128

@@ -156,26 +148,23 @@ if the configuration and version were correctly updated.
156148
docker restart kind-control-plane
157149
```
158150

159-
7. Open up both NGF and NGINX container logs and check for errors.
160-
8. Exec back into the NGINX container and check that `http.conf` and `config-version.conf` were not changed.
161-
9. Send traffic through the example application and ensure it is working correctly.
162-
10. Check that NGF can still process changes of resources.
151+
7. Check the logs of the old and new NGF and NGINX containers for errors.
152+
8. Send traffic through the example application and ensure it is working correctly.
153+
9. Check that NGF can still process changes of resources.
163154
1. Delete the HTTPRoute resources.
164155

165156
```console
166157
kubectl delete -f ../../examples/https-termination/cafe-routes.yaml
167158
```
168159

169-
2. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
170-
3. Send traffic through the example application using the updated resources and ensure traffic does not flow.
171-
4. Apply the HTTPRoute resources.
160+
2. Send traffic through the example application using the updated resources and ensure traffic does not flow.
161+
3. Apply the HTTPRoute resources.
172162

173163
```console
174164
kubectl apply -f ../../examples/https-termination/cafe-routes.yaml
175165
```
176166

177-
5. Inside the NGINX container, check that `http.conf` and `config-version.conf` were correctly updated.
178-
6. Send traffic through the example application using the updated resources and ensure traffic flows correctly.
167+
4. Send traffic through the example application using the updated resources and ensure traffic flows correctly.
179168

180169
#### Restart Node without draining
181170

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Results for v1.1.0
2+
3+
<!-- TOC -->
4+
- [Results for v1.1.0](#results-for-v110)
5+
- [Summary](#summary)
6+
- [Versions](#versions)
7+
- [Tests](#tests)
8+
- [Restart nginx-gateway container](#restart-nginx-gateway-container)
9+
- [Restart NGINX container](#restart-nginx-container)
10+
- [Restart Node with draining](#restart-node-with-draining)
11+
- [Restart Node without draining](#restart-node-without-draining)
12+
- [Future Improvements](#future-improvements)
13+
<!-- TOC -->
14+
15+
16+
## Summary
17+
18+
- No new issues since 1.0.
19+
- One new error in the [Restart Node with draining](#restart-node-with-draining) test, but it is not actionable.
20+
21+
## Versions
22+
23+
NGF version:
24+
25+
26+
```text
27+
commit: d6bbdba28a0f9ae3f75864855b76b0fb34bee3e5
28+
date: 2023-12-05T18:43:51Z
29+
version: edge
30+
```
31+
32+
with NGINX:
33+
34+
```text
35+
nginx/1.25.3
36+
built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r10)
37+
OS: Linux 5.15.49-linuxkit-pr
38+
```
39+
40+
41+
Kubernetes:
42+
43+
```text
44+
Server Version: version.Info{Major:"1", Minor:"28",
45+
GitVersion:"v1.28.0",
46+
GitCommit:"855e7c48de7388eb330da0f8d9d2394ee818fb8d",
47+
GitTreeState:"clean", BuildDate:"2023-08-15T21:26:40Z",
48+
GoVersion:"go1.20.7", Compiler:"gc",
49+
Platform:"linux/arm64"}
50+
```
51+
52+
## Tests
53+
54+
### Restart nginx-gateway container
55+
56+
No errors.
57+
58+
### Restart NGINX container
59+
60+
The NGF Pod was unable to recover after sending a SIGKILL signal to the NGINX master process.
61+
The following appeared in the NGINX logs:
62+
63+
```text
64+
2023/12/05 22:18:45 [emerg] 116#116: bind() to unix:/var/run/nginx/nginx-config-version.sock failed (98: Address in use)
65+
2023/12/05 22:18:45 [emerg] 116#116: bind() to unix:/var/lib/nginx/nginx-502-server.sock failed (98: Address in use)
66+
2023/12/05 22:18:45 [emerg] 116#116: bind() to unix:/var/lib/nginx/nginx-500-server.sock failed (98: Address in use)
67+
2023/12/05 22:18:45 [emerg] 116#116: bind() to unix:/var/run/nginx/nginx-status.sock failed (98: Address in use)
68+
2023/12/05 22:18:45 [notice] 116#116: try again to bind() after 500ms
69+
```
70+
71+
NGF cannot update NGINX after this and logs the following error:
72+
73+
```text
74+
{
75+
"level": "error",
76+
"ts": "2023-12-05T22:19:53Z",
77+
"logger": "eventLoop.eventHandler",
78+
"msg": "Failed to update NGINX configuration",
79+
"batchID": 22,
80+
"error": "failed to reload NGINX: open /proc/19/task/19/children: no such file or directory",
81+
"stacktrace": "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static.(*eventHandlerImpl).HandleEventBatch\n\t/home/runner/work/nginx-gateway-fabric/nginx-gateway-fabric/internal/mode/static/handler.go:116\ngithub.com/nginxinc/nginx-gateway-fabric/internal/framework/events.(*EventLoop).Start.func1.1\n\t/home/runner/work/nginx-gateway-fabric/nginx-gateway-fabric/internal/framework/events/loop.go:74"
82+
}
83+
```
84+
85+
Known issue: https://github.com/nginxinc/nginx-gateway-fabric/issues/1108
86+
87+
88+
### Restart Node with draining
89+
90+
Previous NGF container error:
91+
92+
```json
93+
{
94+
"level": "error",
95+
"ts": "2023-12-05T21:43:31Z",
96+
"logger": "eventLoop.eventHandler",
97+
"msg": "Failed to update NGINX configuration",
98+
"batchID": 11,
99+
"error": "failed to reload NGINX: could not get expected config version 7: error getting client: Get \"http://config-version/version\": dial unix /var/run/nginx/nginx-config-version.sock: connect: no such file or directory",
100+
"stacktrace": "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static.(*eventHandlerImpl).HandleEventBatch\n\t/home/runner/work/nginx-gateway-fabric/nginx-gateway-fabric/internal/mode/static/handler.go:116\ngithub.com/nginxinc/nginx-gateway-fabric/internal/framework/events.(*EventLoop).Start.func1.1\n\t/home/runner/work/nginx-gateway-fabric/nginx-gateway-fabric/internal/framework/events/loop.go:74"
101+
}
102+
```
103+
104+
This error is likely due to NGINX terminating during a reload attempt and does not consistently occur on a node restart.
105+
106+
No errors in previous NGINX container.
107+
No errors in new NGF/NGINX containers.
108+
109+
### Restart Node without draining
110+
111+
The NGF Pod was unable to recover the majority of times after running `docker restart kind-control-plane`.
112+
113+
The following appeared in the NGINX logs:
114+
115+
```text
116+
2023/12/05 21:53:51 [emerg] 29#29: bind() to unix:/var/run/nginx/nginx-status.sock failed (98: Address in use)
117+
2023/12/05 21:53:51 [notice] 29#29: try again to bind() after 500ms
118+
2023/12/05 21:53:51 [emerg] 29#29: bind() to unix:/var/run/nginx/nginx-status.sock failed (98: Address in use)
119+
2023/12/05 21:53:51 [notice] 29#29: try again to bind() after 500ms
120+
2023/12/05 21:53:51 [emerg] 29#29: bind() to unix:/var/run/nginx/nginx-status.sock failed (98: Address in use)
121+
2023/12/05 21:53:51 [notice] 29#29: try again to bind() after 500ms
122+
2023/12/05 21:53:51 [emerg] 29#29: bind() to unix:/var/run/nginx/nginx-status.sock failed (98: Address in use)
123+
2023/12/05 21:53:51 [notice] 29#29: try again to bind() after 500ms
124+
2023/12/05 21:53:51 [emerg] 29#29: bind() to unix:/var/run/nginx/nginx-status.sock failed (98: Address in use)
125+
2023/12/05 21:53:51 [notice] 29#29: try again to bind() after 500ms
126+
2023/12/05 21:53:51 [emerg] 29#29: still could not bind()
127+
```
128+
129+
The following appeared in the NGF logs:
130+
131+
```text
132+
failed to start control loop: cannot create nginx metrics collector: failed to get http://config-status/stub_status: Get "http://config-status/stub_status": dial unix /var/run/nginx/nginx-status.sock: connect: connection refused
133+
```
134+
135+
Known issue: https://github.com/nginxinc/nginx-gateway-fabric/issues/1108
136+
137+
## Future Improvements
138+
139+
- None

‎tests/scale/results/1.1.0/1.1.0.md

+224
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
# Results for v1.1.0
2+
3+
<!-- TOC -->
4+
- [Results for v1.1.0](#results-for-v110)
5+
- [Summary](#summary)
6+
- [Versions](#versions)
7+
- [Tests](#tests)
8+
- [Scale Listeners](#scale-listeners)
9+
- [Scale HTTPS Listeners](#scale-https-listeners)
10+
- [Scale HTTPRoutes](#scale-httproutes)
11+
- [Scale Upstream Servers](#scale-upstream-servers)
12+
- [Scale HTTP Matches](#scale-http-matches)
13+
- [Future Improvements](#future-improvements)
14+
<!-- TOC -->
15+
16+
## Summary
17+
18+
- Memory usage has increased since 1.0
19+
- Number of events being processed has increased a bit, therefore so has the average time.
20+
- CPU and TTR seem to have stayed about the same.
21+
- One of the CPU charts for the final test was not being calculated properly.
22+
23+
## Versions
24+
25+
NGF version:
26+
27+
```text
28+
commit: 7a37efac52546f2fe24dbc2772e913a49329ed6c
29+
date: 2023-12-06T02:17:06Z
30+
version: edge
31+
```
32+
33+
with NGINX:
34+
35+
```text
36+
nginx/1.25.3
37+
built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r10)
38+
OS: Linux 5.15.109+
39+
```
40+
41+
Kubernetes:
42+
43+
```json
44+
"serverVersion": {
45+
"major": "1",
46+
"minor": "27",
47+
"gitVersion": "v1.27.3-gke.100",
48+
"gitCommit": "6466b51b762a5c49ae3fb6c2c7233ffe1c96e48c",
49+
"gitTreeState": "clean",
50+
"buildDate": "2023-06-23T09:27:28Z",
51+
"goVersion": "go1.20.5 X:boringcrypto",
52+
"compiler": "gc",
53+
"platform": "linux/amd64"
54+
}
55+
```
56+
57+
## Tests
58+
59+
### Scale Listeners
60+
61+
Reloads:
62+
63+
| Total | Total Errors | Ave Time (ms) | <= 500ms |
64+
|-------|--------------|--------------------|----------|
65+
| 128 | 0 | 136.38250641586066 | 100% |
66+
67+
68+
Event Batch Processing:
69+
70+
| Total | Ave Time (ms) | <= 500ms | <= 1000ms |
71+
|-------|--------------------|----------|-----------|
72+
| 467 | 228.32680399999995 | 89.07% | 97.43% |
73+
74+
**NGINX Errors**: None.
75+
76+
**NGF Errors**: None.
77+
78+
**Pod Restarts**: None.
79+
80+
**CPU**: ![CPU.png](/tests/scale/results/1.1.0/TestScale_Listeners/CPU.png).
81+
82+
**Memory**: ![Memory.png](/tests/scale/results/1.1.0/TestScale_Listeners/Memory.png).
83+
84+
**Time To Ready**: ![TTR.png](/tests/scale/results/1.1.0/TestScale_Listeners/TTR.png).
85+
86+
### Scale HTTPS Listeners
87+
88+
Reloads:
89+
90+
| Total | Total Errors | Ave Time (ms) | <= 500ms |
91+
|-------|--------------|--------------------|----------|
92+
| 106 | 0 | 153.87735849056605 | 100% |
93+
94+
95+
Event Batch Processing:
96+
97+
| Total | Ave Time (ms) | <= 500ms | <= 1000ms | <= 5000ms |
98+
|-------|--------------------|----------|-----------|-----------|
99+
| 520 | 266.9285714285714 | 92.5% | 100% | 100% |
100+
101+
102+
**NGINX Errors**: None.
103+
104+
**NGF Errors**: None.
105+
106+
**Pod Restarts**: None.
107+
108+
**CPU**: ![CPU.png](/tests/scale/results/1.1.0/TestScale_HTTPSListeners/CPU.png).
109+
110+
**Memory**: ![Memory.png](/tests/scale/results/1.1.0/TestScale_HTTPSListeners/Memory.png).
111+
112+
**Time To Ready**: ![TTR.png](/tests/scale/results/1.1.0/TestScale_HTTPSListeners/TTR.png).
113+
114+
### Scale HTTPRoutes
115+
116+
Reloads:
117+
118+
| Delay | Total | Total Errors | Ave Time (ms) | <= 500ms | <= 1000ms |
119+
|-----------|-------|--------------|-------------------|----------|-----------|
120+
| 2 seconds | 1001 | 0 | 364.405076142132 | 75.92% | 100% |
121+
| No delay | 1001 | 0 | 358.1523316062176 | 75.92% | 100% |
122+
123+
124+
Event Batch Processing:
125+
126+
| Delay | Total | Ave Time | <= 500ms | <= 1000ms |
127+
|-----------|-------|--------------------|----------|-----------|
128+
| 2 seconds | 2056 | 200.38335809806838 | 83.37% | 100% |
129+
| No delay | 2044 | 197.871000507872 | 83.22% | 100% |
130+
131+
132+
**NGINX Errors**: None.
133+
134+
**NGF Errors**: None.
135+
136+
**Pod Restarts**: None.
137+
138+
**CPU**:
139+
140+
2-sec delay:
141+
![CPU.png](/tests/scale/results/1.1.0/TestScale_HTTPRoutes/CPU.png).
142+
143+
No delay:
144+
![CPU.png](/tests/scale/results/1.1.0/TestScale_HTTPRoutes/CPU-no-delay.png).
145+
146+
**Memory**:
147+
148+
2-sec delay:
149+
![Memory.png](/tests/scale/results/1.1.0/TestScale_HTTPRoutes/Memory.png).
150+
151+
No delay:
152+
![Memory.png](/tests/scale/results/1.1.0/TestScale_HTTPRoutes/Memory-no-delay.png).
153+
154+
**TTR**:
155+
156+
Combined:
157+
![TTR.png](/tests/scale/results/1.1.0/TestScale_HTTPRoutes/TTR.png)
158+
159+
### Scale Upstream Servers
160+
161+
| Start Time (UNIX) | End Time (UNIX) | Duration (s) |
162+
|-------------------|-----------------|--------------|
163+
| 1701893886 | 1701893955 | 69 |
164+
165+
Reloads:
166+
167+
| Total | Total Errors | Ave Time (ms) | <= 500ms |
168+
|-------|--------------|---------------------|----------|
169+
| 157 | 0 | 1126.36305732484075 | 100% |
170+
171+
Event Batch Processing:
172+
173+
| Total | Ave Time (ms) | <=500ms | <= 1000ms | <= 5000ms |
174+
|-------|--------------------|---------|-----------|-----------|
175+
| 159 | 210.08176100628933 | 99.37% | 100% | 100% |
176+
177+
**NGINX Errors**: None.
178+
179+
**NGF Errors**: None.
180+
181+
**Pod Restarts**: None.
182+
183+
**CPU**: ![CPU.png](/tests/scale/results/1.1.0/TestScale_UpstreamServers/CPU.png).
184+
185+
**Memory**: ![Memory.png](/tests/scale/results/1.1.0/TestScale_UpstreamServers/Memory.png).
186+
187+
### Scale HTTP Matches
188+
189+
**Results for the first match**:
190+
191+
```text
192+
Running 30s test @ http://cafe.example.com
193+
2 threads and 10 connections
194+
Thread Stats Avg Stdev Max +/- Stdev
195+
Latency 25.09ms 57.91ms 693.45ms 97.96%
196+
Req/Sec 284.70 24.62 330.00 84.30%
197+
16710 requests in 30.01s, 5.91MB read
198+
Requests/sec: 556.84
199+
Transfer/sec: 201.74KB
200+
```
201+
202+
**Results for the last match**:
203+
204+
```text
205+
Running 30s test @ http://cafe.example.com
206+
2 threads and 10 connections
207+
Thread Stats Avg Stdev Max +/- Stdev
208+
Latency 17.63ms 1.93ms 56.53ms 86.77%
209+
Req/Sec 284.44 18.22 323.00 74.29%
210+
17025 requests in 30.10s, 6.02MB read
211+
Requests/sec: 565.66
212+
Transfer/sec: 204.94KB
213+
```
214+
215+
**Findings**:
216+
217+
- There's not a noticeable difference between the response times for the first match and last match. In
218+
fact, the latency of the last match is slightly lower than the latency of the first match.
219+
220+
## Future Improvements
221+
222+
- Check that the statuses of the Gateway API resources are updated after each scaling event.
223+
- Measure the time it takes for NGF to update the status of the Gateway API resources after creating or updating the resources.
224+
- Record the reload time distributions per bucket after each test.
Loading
Loading
Loading
Loading
Loading

‎tests/scale/results/1.1.0/TestScale_HTTPRoutes/results-no-delay.csv

+1,003
Large diffs are not rendered by default.

‎tests/scale/results/1.1.0/TestScale_HTTPRoutes/results.csv

+1,003
Large diffs are not rendered by default.
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# HTTPS Listeners,Time to Ready (s),Error
2+
1,0.298623292
3+
2,0.290336833
4+
3,0.306998416
5+
4,0.321833583
6+
5,0.285856459
7+
6,0.286231417
8+
7,0.292070875
9+
8,0.290567292
10+
9,0.650310959
11+
10,0.304725541
12+
11,0.3069135
13+
12,0.302009791
14+
13,0.648091833
15+
14,0.294033625
16+
15,0.296551583
17+
16,0.646265417
18+
17,0.65992275
19+
18,0.300309625
20+
19,0.29289875
21+
20,0.64213275
22+
21,0.650311333
23+
22,0.646811375
24+
23,0.299184917
25+
24,0.642298041
26+
25,0.671666917
27+
26,0.69368975
28+
27,0.646926875
29+
28,0.643671833
30+
29,0.643396
31+
30,0.644220583
32+
31,0.644612125
33+
32,0.643424875
34+
33,0.64300325
35+
34,0.649530875
36+
35,0.652973417
37+
36,0.662407125
38+
37,0.644821041
39+
38,0.641600792
40+
39,0.640892584
41+
40,0.6504125
42+
41,0.65593525
43+
42,0.6443835
44+
43,0.644433459
45+
44,0.635714292
46+
45,0.655499542
47+
46,0.649910792
48+
47,0.651249583
49+
48,0.676125125
50+
49,0.663608084
51+
50,0.675555542
52+
51,0.859976208
53+
52,0.64676775
54+
53,0.863790542
55+
54,0.639687417
56+
55,0.847149833
57+
56,0.641498833
58+
57,0.863656417
59+
58,0.842914875
60+
59,0.837865
61+
60,1.071833125
62+
61,0.836140667
63+
62,0.84014325
64+
63,1.244114458
65+
64,1.102959541
66+
Test Start,Test End,Test End + 10s,Duration
67+
1701885669,1701885816,1701885826,2m26.985204958s
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Listeners,Time to Ready (s),Error
2+
1,0.210250292
3+
2,0.192975292
4+
3,0.188067917
5+
4,0.191371875
6+
5,0.191525792
7+
6,0.193815083
8+
7,0.215587666
9+
8,0.191928708
10+
9,0.193707042
11+
10,0.494461958
12+
11,0.498684708
13+
12,0.207748208
14+
13,0.19541975
15+
14,0.18638525
16+
15,0.491794084
17+
16,0.5214365
18+
17,0.192586167
19+
18,0.214503042
20+
19,0.490024917
21+
20,0.491494291
22+
21,0.51203375
23+
22,0.686117667
24+
23,0.493136625
25+
24,0.529205833
26+
25,0.491464417
27+
26,0.894854583
28+
27,0.487970833
29+
28,0.487137958
30+
29,0.499481375
31+
30,0.504625333
32+
31,0.902609459
33+
32,0.487152709
34+
33,0.525170417
35+
34,0.50292825
36+
35,1.090166875
37+
36,0.493419167
38+
37,0.489361458
39+
38,0.1961595
40+
39,1.301617375
41+
40,0.490068334
42+
41,0.487308541
43+
42,0.513367708
44+
43,0.515950375
45+
44,0.501541625
46+
45,0.696882167
47+
46,0.490644666
48+
47,0.514852625
49+
48,0.507536333
50+
49,0.487025209
51+
50,0.886309541
52+
51,0.488347708
53+
52,0.689164708
54+
53,0.891632541
55+
54,1.311187042
56+
55,1.086047834
57+
56,0.89004
58+
57,0.69001625
59+
58,0.696373958
60+
59,0.73816675
61+
60,1.091213458
62+
61,1.6926421249999999
63+
62,0.690621292
64+
63,0.893777708
65+
64,0.926865209
66+
Test Start,Test End,Test End + 10s,Duration
67+
1701879986,1701880143,1701880153,2m36.901530417s
Loading
Loading

‎tests/scale/scale.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,13 @@ Follow these steps to run the test:
361361
- Test the first match:
362362

363363
```console
364-
./wrk -t2 -c10 -d30 http://cafe.example.com -H "header-1: header-1-val"
364+
wrk -t2 -c10 -d30 http://cafe.example.com -H "header-1: header-1-val"
365365
```
366366

367367
- Test the last match:
368368

369369
```console
370-
./wrk -t2 -c10 -d30 http://cafe.example.com -H "header-50: header-50-val"
370+
wrk -t2 -c10 -d30 http://cafe.example.com -H "header-50: header-50-val"
371371
```
372372

373373
- Copy and paste the results into the results file.
@@ -472,3 +472,4 @@ Follow these steps to run the test:
472472
### Results
473473

474474
- [1.0.0](/tests/scale/results/1.0.0/1.0.0.md)
475+
- [1.1.0](/tests/scale/results/1.1.0/1.1.0.md)

‎tests/scale/scale_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
var (
2626
numIterations = flag.Int("i", 1, "number of times to scale the resource")
2727
delay = flag.Duration("delay", 0, "delay between each scaling iteration")
28-
version = flag.String("version", "1.0.0", "version of NGF under test")
28+
version = flag.String("version", "1.1.0", "version of NGF under test")
2929
)
3030

3131
func TestScale_Listeners(t *testing.T) {

0 commit comments

Comments
 (0)
Please sign in to comment.