Hi everyone, I'm curious why the Dir route is implemented within Mongrel2 instead of within a ZeroMQ handler? It would seem that using a ZeroMQ handler would automatically make serving static files more scalable or would ZeroMQ impose too much overhead for serving files? Regards, Fred Oranje
today all you have to do is make a handler serving files . . . a UDT handler would be nice . http://udt.sourceforge.net/ if the design of M2 was all subsystems is zmq handlers, it would have been a much more hacker friendly and extensible toolbox ... On Fri, Nov 5, 2010 at 8:49 AM, Fred Oranje <foranje@me.com> wrote: > Hi everyone, > > I'm curious why the Dir route is implemented within Mongrel2 instead of > within a ZeroMQ handler? > > It would seem that using a ZeroMQ handler would automatically make serving > static files more scalable or would ZeroMQ impose too much overhead for > serving files? > > Regards, > > Fred Oranje
Because it'd be much slower on account of the handler needing to send the data to mongrel2 before the data can be then sent to the client. As opposed to just using sendfile. On Nov 5, 2010 7:21 PM, "Peter Fagerlund" <admin@iprobot.com> wrote: > today all you have to do is make a handler serving files . . . a UDT > handler would be nice . http://udt.sourceforge.net/ > > if the design of M2 was all subsystems is zmq handlers, it would have > been a much more hacker friendly and extensible toolbox ... > > On Fri, Nov 5, 2010 at 8:49 AM, Fred Oranje <foranje@me.com> wrote: >> Hi everyone, >> >> I'm curious why the Dir route is implemented within Mongrel2 instead of >> within a ZeroMQ handler? >> >> It would seem that using a ZeroMQ handler would automatically make serving >> static files more scalable or would ZeroMQ impose too much overhead for >> serving files? >> >> Regards, >> >> Fred Oranje
On Fri, Nov 05, 2010 at 07:24:31PM +1100, joshua simmons wrote: > Because it'd be much slower on account of the handler needing to send the > data to mongrel2 before the data can be then sent to the client. As opposed > to just using sendfile. Yep, that and serving files is such a basic thing that people use it as the first test of a server. If it's slow or hard to configure the nobody would use the server. -- Zed A. Shaw http://zedshaw.com/
Is zeromq hit at all, for a request routed to Dir() or Proxy()? -- Alex Leverington On Nov 5, 2010, at 3:41 AM, Zed A. Shaw wrote: > On Fri, Nov 05, 2010 at 07:24:31PM +1100, joshua simmons wrote: >> Because it'd be much slower on account of the handler needing to send the >> data to mongrel2 before the data can be then sent to the client. As opposed >> to just using sendfile. > > Yep, that and serving files is such a basic thing that people use it as > the first test of a server. If it's slow or hard to configure the > nobody would use the server. > > -- > Zed A. Shaw > http://zedshaw.com/
On Fri, Nov 05, 2010 at 03:48:46AM -0500, Alex Leverington wrote: > > Is zeromq hit at all, for a request routed to Dir() or Proxy()? Yep, but don't take my word for it, go write one and see. It's not hard to try the idea out with a handler. -- Zed A. Shaw http://zedshaw.com/
in src/log.c there is zmq .. On Fri, Nov 5, 2010 at 10:05 AM, Zed A. Shaw <zedshaw@zedshaw.com> wrote: > On Fri, Nov 05, 2010 at 03:48:46AM -0500, Alex Leverington wrote: >> >> Is zeromq hit at all, for a request routed to Dir() or Proxy()? > > Yep, but don't take my word for it, go write one and see. It's not hard > to try the idea out with a handler. > > -- > Zed A. Shaw > http://zedshaw.com/ >
so that means that every connect to M2 Dir/Proxy/Handler goes thought or rather uses zmq as the access log is piped in a zmq inproc://socket ... On Fri, Nov 5, 2010 at 10:14 AM, Peter Fagerlund <admin@iprobot.com> wrote: > in src/log.c there is zmq .. > > On Fri, Nov 5, 2010 at 10:05 AM, Zed A. Shaw <zedshaw@zedshaw.com> wrote: >> On Fri, Nov 05, 2010 at 03:48:46AM -0500, Alex Leverington wrote: >>> >>> Is zeromq hit at all, for a request routed to Dir() or Proxy()? >> >> Yep, but don't take my word for it, go write one and see. It's not hard >> to try the idea out with a handler. >> >> -- >> Zed A. Shaw >> http://zedshaw.com/ >> >
On Fri, Nov 05, 2010 at 03:26:04PM +0100, Peter Fagerlund wrote: > so that means that every connect to M2 Dir/Proxy/Handler goes thought > or rather uses zmq as the access log is piped in a zmq inproc://socket That's so the log (if you want it on) isn't blocked by disk writes. The inproc just sends it to a thread so there's no data copying and it's just a single log message. You can also turn this off too if you can't even handle the overhead of a small little data send. HUGE difference between that and a fully cached, 304 aware, unix/tcp socket file handler that transmits tons of data efficiently. But, like I said, go ahead and write one. It'd be easy to test your idea by just writing your own and trying it. -- Zed A. Shaw http://zedshaw.com/
No. On Nov 5, 2010 7:49 PM, "Alex Leverington" <nessence@gmail.com> wrote: > > Is zeromq hit at all, for a request routed to Dir() or Proxy()? > > > > -- > Alex Leverington > > On Nov 5, 2010, at 3:41 AM, Zed A. Shaw wrote: > >> On Fri, Nov 05, 2010 at 07:24:31PM +1100, joshua simmons wrote: >>> Because it'd be much slower on account of the handler needing to send the >>> data to mongrel2 before the data can be then sent to the client. As opposed >>> to just using sendfile. >> >> Yep, that and serving files is such a basic thing that people use it as >> the first test of a server. If it's slow or hard to configure the >> nobody would use the server. >> >> -- >> Zed A. Shaw >> http://zedshaw.com/ >