Welcome! Log In Create A New Profile

Advanced

Re: Help, I need write a nginx module

Gabriel Ramuglia
September 25, 2009 04:00AM
I don't think this is really necessary. You can use proxy upstream or
fastcgi to connect to php (or perl or whatever), which can then do
authentication, and send back a reproxy-url header, which will cause
nginx to send the user the contents of whatever url you send back,
which can be a local file or a remote http link. this is very fast and
efficient. I have no problems proxying out over 300 megabit of traffic
from a single server in this manner, with minimal ram use, and most of
the cpu time used being taken up by the network card's interrupts.

the only part i'm fuzzy on is the metadata. how exactly does that fit in here?

On Fri, Sep 25, 2009 at 7:35 AM, fuji246 <nginx-forum@nginx.us> wrote:
> I need to write a nginx module to enhance the performance of our service.The following is what our service doing,
>
>    1. When getting the http request from the client,  our service send http request to another server to validate the identification of the client.
>
>    2. If the validation passed, then send http request to another server to get the metainfo of the file requested by the client.
>
>    3. If the metainfo is retrieved,  use the metainfo to pull file data from backend stroage using http GET.
>
>    I've read the guide of nginx module developement, but that's not enough, these days, I've been reading the code of nginx. It's a hard job, i confess.
>    I think, I should write a handler module, and using upstream to interact with other services, as far as i know , upstream send the response directly to the client,  the only thing I can do is defining an "input_filter" of upstream, I'm wondering whether "input_filter" can be used to initiate another upstream request.
>
>     Any one can help ? Thanks in advance!
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,9136,9136#msg-9136
>
>
>
Subject Author Posted

Help, I need write a nginx module

fuji246 September 25, 2009 02:35AM

Re: Help, I need write a nginx module

Gabriel Ramuglia September 25, 2009 04:00AM

Re: Help, I need write a nginx module

fuji246 September 25, 2009 04:49AM

Re: Help, I need write a nginx module

fuji246 September 25, 2009 05:20AM

Re: Help, I need write a nginx module

Igor Sysoev September 25, 2009 04:56AM

Re: Help, I need write a nginx module

Igor Sysoev September 25, 2009 05:12AM

Re: Help, I need write a nginx module

Gabriel Ramuglia September 25, 2009 11:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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