-
Notifications
You must be signed in to change notification settings - Fork 44
Nginx AIO threads for Concurrent Request
Rudi edited this page Sep 17, 2020
·
12 revisions
sometimes one worker only can process one request per time, what if process the heavy app request might slow down the performance due to synchronize process.
Resolution:- enable the multi threading request, just recompile your nginx by using --with-threads.
After installed, enable the multithread in your server block
http {
server {
listen 8080;
aio threads;
ngx_link_func_lib "/etc/nginx/apps/libcfuntest.so";
location /callme {
ngx_link_func_call "my_app_simple_get_greeting";
}
}
}
Full Sample Config with aio threads
Compilation References: https://www.nginx.com/blog/thread-pools-boost-performance-9x/