Unicorn says it's for "fast clients". Whenever I read elaboration on this, this is explained as it being appropriate for, say, being behind an nginx proxy server serving http requests, and not for running an app that does long-polling.
Okay, makes sense, but the more common case where a request is "slow" is when a POST takes a long time, either because it is streaming up a lot of data (a file upload) or because the action invokes processing in the app that takes a long time.
How does Unicorn behave in these two cases? Where can I read more about this?
I think the idea is that Unicorn isn't made to have hundreds or thousands of open requests. Having a slow form post is fine as long as you don't have hundreds of users all posting that form simultaneously. We have several places where you can upload images on our site and those pages routinely take several seconds to upload and process the image before returning to the user and we haven't had a problem. But, we don't have thousands of users uploading images simultaneously, either.
Rainbows! is the Unicorn-like web server for long polling requests: http://rainbows.rubyforge.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With