Welcome! Log In Create A New Profile

Advanced

Re: how to use my own FD in NGINX

agentzh
May 01, 2011 10:20PM
On Thu, Mar 24, 2011 at 4:37 PM, Philippe RAZAVET
<razavet@stg-interactive.com> wrote:
> Hi
>
> I plan to use NGINX HTTP server on Linux, it uses epoll event loop.
>
> I want to develop a NGINX proxy module using File Descriptors of my
> own (not TCP socket) to forward the requests to a back-end service, and let
> NGINX adds those FDs in his epoll FD set, to handle the responses.
>
> What are the steps to achieve this goal ? (I suppose it is much work
> than a simple proxy module, maybe involving upstream and event module
> development ?)
>

The ngx_drizzle [1] and ngx_postgres [2] modules do register their own
fd's into the nginx event model. You can take a look at their source
code. The ngx_http_upstream module can serve as some kind of a basis,
but it is very limited in its design so we extend it a lot in the two
modules mentioned above and bypass about half of its code paths.

Cheers,
-agentzh

[1] https://github.com/chaoslawful/drizzle-nginx-module
[2] https://github.com/FRiCKLE/ngx_postgres

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

how to use my own FD in NGINX

Philippe RAZAVET 2653 March 24, 2011 04:38AM

Re: how to use my own FD in NGINX

Akins, Brian 834 March 24, 2011 11:48AM

Re: how to use my own FD in NGINX

agentzh 755 May 01, 2011 10:20PM

Re: how to use my own FD in NGINX

Philippe RAZAVET 1037 May 03, 2011 03:50AM



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

Online Users

Guests: 215
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