Answer the question
In order to leave comments, you need to log in
[SOLVED] Balancing with Nginx but with redirect decision logic on a dedicated server?
I'm new to Nginx, so don't hit too hard for a possibly stupid question.
Is it possible to arrange the following scheme: Nginx, having received a request, should contact a certain backend, passing the request parameters there, and get further instructions from it on which backend to send this request for processing. Those. something like load balancing, but where some dedicated server with its own handler is responsible for load balancing.
Answer the question
In order to leave comments, you need to log in
I think such a scheme as you need can be done using x-accel-redirect (all requests go to your backend, and it already redirects nginx to the right place with this header), but the performance will not be the best. I think if you need your own logic for distributing requests across backends, it’s better to write a module for nginx that will implement it
In my opinion, there is no such option as described, but the upstream module is responsible for balancing; there are only a couple of options you can figure it out without problems.
And in general, why do +2 connections? It seems to me that what upstream offers is quite enough.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question