My issue: uneven distribution of requests per connection, so poor connection reuse:
there are connections with thousands of requests and connections with one request only. How I encountered the problem: tested by sending traffic to nginx, proxy requests to internal (sandwich) listener (same nginx) and upstream server.
Has anyone experienced the same? Any suggestions?
Thanks in advance!
From the config, each upstream only has a single node in it, so all the requests would be sent to that one endpoint. From looking at your config, there is simply more traffic hitting one server block than the other. It seems like this would be expected behavior, unless I am missing something about how requests are coming into the NGINX node.
Traffic is coming from test tool to 1st listener :8086 then all requests proxied to upstream which is internal listener :8096 (sandwich). From test tool to 1st listener requests are balanced evenly. However, NGINX distribute requests internally totally uneven, where some connections have thousands of requests, but some connections have only one request, then seems these connections are not identified by nginx as available for reuse.