Recently, I wrote about the dynamic resolution of upstream servers in
nginx which was achieved by quite an intrusive patch to the core nginx module.
The patch was invented a while ago and was working very well up until recent
nginx versions were released.
With the release of nginx 1.10 it was noticed that the patch crashes some
workers under heavy load and this was unacceptable for the production load,
hence a new approach was implemented.
The beauty of the new solution is that it is non-intrusive and works with any
services that communicate via sockets.
In a nutshell
time 9 min.
UPDATE: This approach was superseded by the proxying through
Many of my clients are running application stacks consisting of nginx plus some
kind of scripting engine behind it (be it PHP, Ruby, or something else).
The architecture I designed for this kind of workload involves at least two
- an external, frontend load balancer that serves the web requests from
- an internal, backend load balancer that distributes load between the
Everything looks great when you implement this using “in-house” infrastructure
where you control most of the networking aspects.
However, the tendency is that most
time 1 min.