O
O
Oleg Matrozov2011-12-08 13:03:52
Nginx
Oleg Matrozov, 2011-12-08 13:03:52

[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

3 answer(s)
V
Vitaly Peretyatko, 2011-12-08
@Mear

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

A
Andrey Shiryaev, 2011-12-08
@Claud

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.

E
esc, 2011-12-08
@esc

If the logic is simple (without accessing the DBMS and other external resources), then the perl + accel redirect or rewrite built into nginx will help you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question