zedshaw/mongrel2 — Issue #101: missing handlers, what's next?
Author: rbucker881
Created: 2012-01-28 21:46:41+00:00
State: open

I was intrigued when I read that you were using push->pull and pub->sub in order to move a request/response from the web server to the handler and back. I've looked at the code and I was sufficiently impressed. (non of which is a bug).

I'm hoping that you have a novel approach to solving this particular problem that will arise... and possibly someone who knows will write a test case.

SCENARIO:

there is a web server. it spawns threads or processes with each incoming user-request and in turn issues a zmq connect() to the handler which has already been bind() as an endpoint.

Now say there are 40 instances of the handler.

Now say only half will actually start... so when the first 40 requests arrive at the web server, only half will be served and half with be blocked.

JUSTIFICATION:
The GUIDE says that a connect() will generate a valid connection even if the server providing the bind() is not currently running. Therefore, the transaction will be queued until the server arrives.

I'm going back into the code... could this be a flaw?