---
title: "Comment by Node Edge Ops on \"Configuring NGINX as a Web Server, a Load Balancer and a Reverse Proxy\" | Hashnode"
description: "When nginx is both static server and load balancer I keep upstream keepalive on and size worker_connections for client plus upstream sockets, not just peak RPS."
url: "https://hashnode.com/posts/configuring-nginx-as-a-web-server-and-a-load-balancer/66fc09a08fc33cd7acb5ad7d/comment/6ae537969e7c87c38ce4182b"
---

[Discussion](https://hashnode.com/posts/configuring-nginx-as-a-web-server-and-a-load-balancer/66fc09a08fc33cd7acb5ad7d)

Comment [Configuring NGINX as a Web Server, a Load Balancer and a Reverse Proxy](https://hashnode.com/posts/configuring-nginx-as-a-web-server-and-a-load-balancer/66fc09a08fc33cd7acb5ad7d)

[Node Edge Ops](https://hashnode.com/@nodeedgeops)

[Oct 31](https://hashnode.com/posts/configuring-nginx-as-a-web-server-and-a-load-balancer/66fc09a08fc33cd7acb5ad7d/comment/6ae537969e7c87c38ce4182b)

When nginx is both static server and load balancer I keep upstream keepalive on and size worker\_connections for client plus upstream sockets, not just peak RPS. least\_conn beats round-robin when backends have uneven request cost. After changes I check error\_log for connect() failed vs upstream timed out so I know whether to fix a dead peer or raise proxy\_read\_timeout.
