Can thread pool improve performance for such scenario

Hi All:
I am using Nginx as a reverse proxy which provide a web API (HTTP GET
) to client.
and the backend application will get request from nginx and do some
time-consuming processing (1-2 seconds) then response result to nginx,
Nginx return result to client.
I think this is synchronize operation.

As I know, Nginx import thread pools feature, so is it useful for my
scenario and improve performance?


Rejoice,I Desire!

Hi,

This is what they have to say about threads :

Offloading read operations to the thread pool is a technique applicable
to
very specific tasks. It is most useful where the volume of frequently
requested content doesn’t fit into the operating system’s VM cache. This
might be the case with, for instance, a heavily loaded NGINX-based
streaming media server. This is the situation we’ve simulated in our
benchmark.


So if you got storage which doesn’t fit into Ram such as 2TB storage
with
32Gb RAM . In this case, threads could be useful. Otherwise, nginx is
already very much robust to serve concurrent requests against standard
extensions such as jpeg,css,html and many more.

You can read more about threads in following link :

Regards.
Shahzaib

Hi All:
I am using Nginx as a reverse proxy which provide a web API (HTTP GET
) to client.
and the backend application will get request from nginx and do some
time-consuming processing (1-2 seconds) then response result to nginx,
Nginx return result to client.
I think this is synchronize operation.

What backend protocol? HTTP/TCP? That not blocking at all, no need
to improve anything. What the thread pool currently improves is
sendfile() I/O operations.

Lukas

Backend is uwsgi TCP protocol.
Thanks for your clarify. I am understanding now, Thread pool should
not useful to improve my case.

On Tue, Jun 30, 2015 at 5:17 PM, Lukas T. [email protected]
wrote:

sendfile() I/O operations.

Lukas


nginx mailing list
[email protected]
nginx Info Page


Rejoice,I Desire!