I'm trying to work out if it is possible to use nginx to work around the 230s idle timeout Azure App Services impose.
Our application currently has some long running http requests (and there is work to move to an async pattern, but looking for something in the meantime).
I've read that if you can pass some data over the connection then the request can run for longer than 230s - so bring in nginx!
I have this config based on what I can find in various docs and blogs, but when I trace the tcp packets I don't see it sending anything whilst the connection is waiting for a reply.
upstream longrunning.azurewebsites.net {
server longrunning.azurewebsites.net:80;
keepalive_timeout 5m;
}
server {
listen 8080;
listen [::]:8080;
server_name longrunning.azurewebsites.net;
access_log /var/log/nginx/reverse-access.log;
error_log /var/log/nginx/reverse-error.log;
keepalive_timeout 400s;
location / {
proxy_pass http://longrunning.azurewebsites.net;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_read_timeout 10m;
proxy_socket_keepalive on;
proxy_connect_timeout 5m;
proxy_send_timeout 5m;
send_timeout 5m;
}
}
Is what I'm trying even possible?