Welcome! Log In Create A New Profile

Advanced

Optimizing Nginx as upstream proxy to GraphQL

Posted by hgv 
hgv
Optimizing Nginx as upstream proxy to GraphQL
June 30, 2021 04:46PM
Hi,

I use Nginx (1.21.0) as an upstream proxy for a node GraphQL backend running on the same instance. I get occasional "an upstream response is buffered to a temporary file" entries in the Nginx error log. I would like to understand if that's a bad or neutral thing and, if applicable, how I can improve my config.

If I've understood correctly, proxy buffering can occur if the client's connection is slower than what the upstream server can deliver. That sounds like a pretty normal situation to me especially when clients are mobile apps like in our case. But is there something more to this?

fastcgi_keep_conn on;
fastcgi_buffers 256 16k;
fastcgi_max_temp_file_size 0;
hgv
Re: Optimizing Nginx as upstream proxy to GraphQL
June 30, 2021 05:09PM
Oops...I included the wrong Nginx config parameters in my previous post. :)

proxy_buffering on;
proxy_buffers 16 16k;
proxy_buffer_size 16k;
proxy_busy_buffers_size 16k;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_cache_bypass $http_upgrade;
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 155
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready