Skip to content

Commit b9f8003

Browse files
committed
Add overrides for max_idle_conns_*
This is part of openfaas/faas#1039 to enable fine-tuning of proxy behaviour for load testing. Signed-off-by: Alex Ellis (VMware) <[email protected]>
1 parent d4b8aff commit b9f8003

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

chart/openfaas/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ Additional OpenFaaS options in `values.yaml`.
187187
| `gateway.writeTimeout` | Queue worker write timeout | `65s` |
188188
| `gateway.upstreamTimeout` | Maximum duration of upstream function call, should be lower than `readTimeout`/`writeTimeout` | `60s` |
189189
| `gateway.scaleFromZero` | Enables an intercepting proxy which will scale any function from 0 replicas to the desired amount | `true` |
190+
| `gateway.max_idle_conns` | Set max idle connections from gateway to functions | `1024` |
191+
| `gateway.max_idle_conns_per_host` | Set max idle connections from gateway to functions per host | `1024` |
190192
| `queueWorker.replicas` | Replicas of the queue-worker, pick more than `1` for HA | `1` |
191193
| `queueWorker.ackWait` | Max duration of any async task/request | `60s` |
192194
| `nats.enableMonitoring` | Enable the NATS monitoring endpoints on port `8222` | `false` |

chart/openfaas/templates/gateway-dep.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ spec:
8484
{{- end }}
8585
- name: scale_from_zero
8686
value: "{{ .Values.gateway.scaleFromZero }}"
87+
- name: max_idle_conns
88+
value: "{{ .Values.gateway.maxIdleConns }}"
89+
- name: max_idle_conns_per_host
90+
value: "{{ .Values.gateway.maxIdleConnsPerHost }}"
8791
{{- if .Values.basic_auth }}
8892
volumeMounts:
8993
- name: auth

chart/openfaas/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ gateway:
3232
scaleFromZero: true
3333
# change the port when creating multiple releases in the same baremetal cluster
3434
nodePort: 31112
35+
maxIdleConns: 1024
36+
maxIdleConnsPerHost: 1024
3537

3638
queueWorker:
3739
image: openfaas/queue-worker:0.5.4

yaml/gateway-dep.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ spec:
4646
value: "/etc/openfaas"
4747
- name: scale_from_zero
4848
value: "false"
49-
49+
- name: max_idle_conns
50+
value: "1024"
51+
- name: max_idle_conns_per_host
52+
value: "1024"
5053
ports:
5154
- containerPort: 8080
5255
protocol: TCP

0 commit comments

Comments
 (0)