P
P
Philipp2015-03-05 19:26:25
Nginx
Philipp, 2015-03-05 19:26:25

How to make a non-blocking subrequest in nginx after serving content?

The bottom line is that there are a lot of pictures requested from the server. You need to follow up with them. Each has a unique setting. Now there is an application on nodejs, which now tracks everything and gives pictures. The application is not entirely stable.
The idea is this - to transfer the return of images to nginx, because. it is very reliable and somehow set it up so that it makes a subrequest to the node, but completely ignores what is happening inside it. Roughly speaking, I asked and forgot about it.
Even if there is no connection, then do nothing at all. Just submit a picture. Those. first give the picture, and then the subquery to the node.
Maybe there are other ways to solve this problem.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
evnuh, 2015-03-05
@zoonman

A bunch of options come to mind, from fast redis & redis_nginx_module types, and you already read anything from radish, to simple LUA sockets inside nginx-a. We gave the picture to nginx, he himself launched your lua script, which asynchronously sent a request to the node and immediately returned it.

Y
Yuri Shikanov, 2015-03-05
@dizballanze

Maybe just read the Nginx logs?

A
Andrey Korvyakov, 2015-03-13
@LNShadow

Do you just need to get request counters for each picture, or do you need a more cunning stat?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question