I'd like to configure the Nginx Ingress Controller to buffer upload file content into a temporary file instead of storing it in memory #11352
Labels
needs-kind
Indicates a PR lacks a `kind/foo` label and requires one.
needs-priority
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
I'd like to configure the Nginx Ingress Controller to optimize the handling of file upload requests by buffering them into temporary files instead of utilizing memory. Specifically when modsecurity(WAF) is enabled, I encountered an issue where uploading 2GB text files resulted in the controller pod consuming 2GB of memory. Upon inspection, I noticed that the client request body buffer was being stored in the temporary directory "/tmp/nginx/client-body/". To address this, I aim to minimize memory usage by buffering requests into temporary files and disable the response buffer. Below is the configuration I utilized with Helm chart values:
Spec:
nginx version: nginx/1.19.10
k8s server version: v1.23.17
helm version: v3.13.2
Ingress controller helm chart version: 3.39.0
I appreciate any guidance or suggestions on how to optimize this configuration further.
The text was updated successfully, but these errors were encountered: