Welcome! Log In Create A New Profile

Advanced

Re: Nginx module development practice with blocking call

Vladimir Shebordaev
May 14, 2012 09:52AM
Hi!

Increasing the number of nginx worker processes is not scalable and
rather wasteful solution, it can easily affect overall server
performance. Basically, current nginx design does not provide much for
dynamic content generation but it has well-developed facilities for
caching and proxying. So, it seems, the best option for you is to
move to fastcgi interface and handle db access percularities in the
application code.

In the hope it helps.

Regards,
Vladimir

2012/5/14 vivek goel <goelvivek2011@gmail.com>:
> I am writing nginx module which uses sqlite to do some read operation. As
> sqlite read doesn't support non-blocking call(according to my knowledge).
> What will be best solution to integrate it with nginx.
> I am accepting near about 200 at the same time. One request takes near about
> 200 ms to process. What method will be the best implementation using nginx:
>
> Increasing nginx worker process count to 50-200. So I will having enough
> worker to accept client request.
> My concern it that will it increasing connecting time of a user on next
> request as there will be less chances that same user will be served by same
> nginx worker process.
> Doing te read in a thread and using nginx event based api to send response.
> So I can handle multiple client using only two or one worker process.
> Moving my code to fastcgi and using nginx fastcgi module to communicate with
> .
>
> What will be the best solution for this implementation ?
>
> regards
> Vivek Goel
>
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Re: Nginx module development practice with blocking call

Vladimir Shebordaev 894 May 14, 2012 09:52AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 218
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready