Providing access to nginx state machine

Marko Kevac marko at
Wed May 12 00:18:57 MSD 2010

On Wed, May 12, 2010 at 12:00 AM, Piotr Sikora <piotr.sikora at> wrote:
> But is this request associated with the incoming request? That is, do you
> want to communicate with your network service for each request and finish it
> before response is sent back to the client?

Yes, that is right. What I am sending to client depends on what I
receive from that network service.

> There is no state machine per se. You need to add/remove your events to/from
> nginx's event model (which is OS-independent abstraction layer on top of
> epoll/kqueue/etc).

Well, yes, but, as far as I understand, there must be some help from
nginx, because request processing must be stopped and continued, after
data from my service is ready.

> Actually, it isn't. It is communicating with 3rd-party library (libdrizzle).
> You won't see any network communication in there, only library calls and
> events triggered on library's socket.

Isn't that the same? Just one more intermediate object appeared - library.
There is no big difference if send() is called by me or by some library.

> Like I said previously, you most likely want to use either subrequests or
> "independent reqequests".

Can you illustrate this, please? I don't really get how sub-request
will help here.

A. Because it breaks the logical sequence of discussion
Q. Why is top posting bad?

More information about the nginx-devel mailing list