views:

57

answers:

1

I have some questions about non-blocking IO:

  1. If I use Ruby without EventMachine on Nginx, could I leverage non-blocking IO?

  2. If i use Ruby with EventMachine but on Apache, could I leverage non-blocking IO?

  3. If the above answers are no, then it means I have to use Ruby with EventMachine on Nginx to leverage non-blocking IO?

A: 

This probably don't really answer your question, but there are evented web servers that are "ruby friendly" you can use instead of Apache or nginx.

Rainbows! is an HTTP Server for Rack applications that utilizes Eventmachine. It's based on Unicorn which is based on Mongrel: http://rainbows.rubyforge.org/

Zbatery is an off shoot of Rainbows! but the main difference is, it's meant to work on systems that either do not support fork(), or have no memory (nor need) to run the master/worker model. http://zbatery.bogomip.org/

Thin is also another HTTP server that is also evented: http://code.macournoyer.com/thin/

phaithful