Skip to content

Commit f2da836

Browse files
authored
Lower upstream count for scale nfr test with nginx plus (#2695)
Problem: We were running into infrequent test failures due to nginx plus running out of memory when scaling upstreams. Solution: Lower the upstream count when running with nginx plus by 2% of the previous maximum. Will monitor future NFR runs to see if this issue persists. Testing: Ran the nfr scale test and it passed.
1 parent 0a4f0fb commit f2da836

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

tests/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ required env vars. `GKE_SVC_ACCOUNT` needs to be the name of a service account t
276276

277277
In order to run the tests in GCP, you need a few things:
278278

279-
- GKE router to allow egress traffic (used by upgrade tests for pulling images from Github)
279+
- GKE router to allow egress traffic (used by upgrade tests for pulling images from Github, and scale/reconfig tests for installing prometheus)
280280
- this assumes that your GKE cluster is using private nodes. If using public nodes, you don't need this.
281281
- GCP VM and firewall rule to send ingress traffic to GKE
282282

@@ -286,6 +286,12 @@ To just set up the VM with no router (this will not run the tests):
286286
make create-and-setup-vm
287287
```
288288

289+
To set up just the router:
290+
291+
```makefile
292+
make create-gke-router
293+
```
294+
289295
Otherwise, you can set up the VM, router, and run the tests with a single command. See the options below.
290296

291297
By default, the tests run using the version of NGF that was `git cloned` during the setup. If you want to make

tests/suite/scale_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var _ = Describe("Scale test", Ordered, Label("nfr", "scale"), func() {
5959
httpsListenerCount = 64
6060
httpRouteCount = 1000
6161
ossUpstreamServerCount = 648
62-
plusUpstreamServerCount = 556
62+
plusUpstreamServerCount = 545
6363
)
6464

6565
BeforeAll(func() {
@@ -441,7 +441,7 @@ The logs are attached only if there are errors.
441441

442442
Eventually(
443443
framework.CreateResponseChecker(url, address, timeoutConfig.RequestTimeout),
444-
).WithTimeout(30 * time.Second).WithPolling(100 * time.Millisecond).Should(Succeed())
444+
).WithTimeout(5 * timeoutConfig.RequestTimeout).WithPolling(100 * time.Millisecond).Should(Succeed())
445445

446446
ttr := time.Since(startCheck)
447447

@@ -475,7 +475,7 @@ The logs are attached only if there are errors.
475475

476476
Eventually(
477477
framework.CreateResponseChecker(url, address, timeoutConfig.RequestTimeout),
478-
).WithTimeout(5 * time.Second).WithPolling(100 * time.Millisecond).Should(Succeed())
478+
).WithTimeout(5 * timeoutConfig.RequestTimeout).WithPolling(100 * time.Millisecond).Should(Succeed())
479479

480480
Expect(
481481
resourceManager.ScaleDeployment(namespace, "backend", upstreamServerCount),
@@ -488,7 +488,7 @@ The logs are attached only if there are errors.
488488

489489
Eventually(
490490
framework.CreateResponseChecker(url, address, timeoutConfig.RequestTimeout),
491-
).WithTimeout(5 * time.Second).WithPolling(100 * time.Millisecond).Should(Succeed())
491+
).WithTimeout(5 * timeoutConfig.RequestTimeout).WithPolling(100 * time.Millisecond).Should(Succeed())
492492
}
493493

494494
setNamespace := func(objects framework.ScaleObjects) {

0 commit comments

Comments
 (0)