DEV Community

Nginx Ingress Controller Load Balancing and Retry with proxy_next_upstream

Bryan Sazon on January 20, 2020

By default, Nginx/Nginx Ingress provides sensible default settings. In the real world, there are a few combinations of configurations that you must...
Collapse
 
michaelbouvy profile image
Michael BOUVY

Thanks Bryan, your article was very helpful understanding nginx ingress controller's LUA balancer behavior!

Collapse
 
bzon profile image
Bryan Sazon

Happy to help!

Collapse
 
jerylcook profile image
Jeryl Cook • Edited

Hi,
you mentioned " proxy-next-upstream-timeout, the value should be greater than the proxy-connect-timeout."

what would be a use-case to modify the upstream timeout?

Collapse
 
bzon profile image
Bryan Sazon

High latency on high request rate can cause high spike in cpu usage. It is a common case to just fail the request instead of serving high latency. In nginx ingress, you can set the timeouts per ingress or global default.

You must have a latency alarms to ensure someone will fix the root cause of the problem.