Take the 2-minute tour ×

I'm a bit confused about this architecture. On one of the projects I'm working on, Unicorn was chosen as a Rails server. And it is put behind Nginx web server. As I understand Unicorn is fully functional web server and we don't plan to host any other Rails applications on the same server instance.

So my question would be: what are the benefits of having additional layer in chain:

client -> nginx -> unicorn -> unicorn worker
share|improve this question
add comment

1 Answer

up vote 14 down vote accepted

Unicorn was not designed to handle "slow clients". You can read more about this in the PHILOSOPHY help file:

Most benchmarks we’ve seen don’t tell you this, and unicorn doesn’t care about slow clients… but you should.




If your application responses are larger than the socket buffer or if you’re handling large requests (uploads), worker processes will also be bottlenecked by the speed of the client connection. You should not allow unicorn to serve clients outside of your local network.

share|improve this answer
Thank you! That's the answer I was looking for :) –  punXter Feb 1 '12 at 14:57
very clear. thanks –  berto77 Apr 3 '12 at 15:44
add comment

Your Answer


