Skip to content

Commit 918b9d4

Browse files
authored
Adjust nginx agent backoff settings and revert request timeout (#3820)
Problem: As a result to NGINX Agent adding a wait for nginx workers to reload before updating nginx configuration, any long-lived connections would result in an excessively long wait between updating nginx configurations. This cause delays in NGF and on NGINX Plus, could cause a dropping of traffic if there was a wait between updating the configuration and updating the NGINX Plus upstreams. Solution: Adjust the NGINX Agent reload configuration to lower the maximum wait time. Reverted the test request timeout duration back to 10 seconds. Testing: Ran the SnippetsFilter functional test a couple of times and verified when there was a long-lived connection blocking on of the test cases, it went from a 27 second timeout -> 3 second. Also deployed nginx and verified the agent configuration was in there.
1 parent 13d2288 commit 918b9d4

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

internal/controller/provisioner/templates.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,13 @@ collector:
8989
"ngf":
9090
receivers: ["host_metrics", "nginx_metrics"]
9191
exporters: ["prometheus"]
92-
{{- end }}`
92+
{{- end }}
93+
data_plane_config:
94+
nginx:
95+
reload_backoff:
96+
initial_interval: .5s
97+
max_interval: 1.5s
98+
max_elapsed_time: 3s
99+
randomization_factor: 0.5
100+
multiplier: 1.5
101+
`

tests/framework/timeout.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func DefaultTimeoutConfig() TimeoutConfig {
4949
DeleteNamespaceTimeout: 150 * time.Second,
5050
GetTimeout: 10 * time.Second,
5151
ManifestFetchTimeout: 10 * time.Second,
52-
RequestTimeout: 30 * time.Second,
52+
RequestTimeout: 10 * time.Second,
5353
ContainerRestartTimeout: 10 * time.Second,
5454
GetLeaderLeaseTimeout: 60 * time.Second,
5555
GetStatusTimeout: 60 * time.Second,

0 commit comments

Comments
 (0)