unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* Rainbows! or unicorn?
@ 2011-09-16 10:19 russell muetzelfeldt
  2011-09-16 11:11 ` Eric Wong
  0 siblings, 1 reply; 4+ messages in thread
From: russell muetzelfeldt @ 2011-09-16 10:19 UTC (permalink / raw)
  To: mongrel-unicorn

I'm putting together a small web frontend for a client to upload files into an existing application. It's trivial - there will never be more than a (small) handful of concurrent connections, but I need a streaming rack.input for upload progress on files up to 500MB or so. I was planning on using Rainbows! with ThreadSpawn and worker_connections=1, then noticed that unicorn is also listed as having streaming rack.input.

While what I'm doing is pretty much the opposite of the unicorn design case, is there any reason in this scenario for me to use Rainbows!, or should I just go with unicorn and enough backends to handle a couple of concurrent uploads and the minimal other frontend bits?

cheers

Russell


-----
Russell Muetzelfeldt <russm@slofith.org>
Mundus vult decipi, ergo decipiatur.

_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Rainbows! or unicorn?
  2011-09-16 10:19 Rainbows! or unicorn? russell muetzelfeldt
@ 2011-09-16 11:11 ` Eric Wong
  2011-09-16 12:38   ` russell muetzelfeldt
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Wong @ 2011-09-16 11:11 UTC (permalink / raw)
  To: unicorn list

russell muetzelfeldt <russm-rubyforge@slofith.org> wrote:
> I'm putting together a small web frontend for a client to upload files
> into an existing application. It's trivial - there will never be more
> than a (small) handful of concurrent connections, but I need a
> streaming rack.input for upload progress on files up to 500MB or so. I
> was planning on using Rainbows! with ThreadSpawn and
> worker_connections=1, then noticed that unicorn is also listed as
> having streaming rack.input.

:ThreadSpawn + worker_connections=1 and the (default) :Base option are
almost the same in Rainbows! if you don't want to worry about your app
being thread-safe at all.

> While what I'm doing is pretty much the opposite of the unicorn design
> case, is there any reason in this scenario for me to use Rainbows!, or
> should I just go with unicorn and enough backends to handle a couple
> of concurrent uploads and the minimal other frontend bits?

Rainbows! can (and does by default) limit upload sizes
(client_max_body_size) for handling untrusted clients who may try to
run you out of space.

Since performance/scalability isn't your concern, it depends on whether
you trust your clients to not upload until you run out of disk space.

-- 
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Rainbows! or unicorn?
  2011-09-16 11:11 ` Eric Wong
@ 2011-09-16 12:38   ` russell muetzelfeldt
  2011-09-16 17:00     ` Eric Wong
  0 siblings, 1 reply; 4+ messages in thread
From: russell muetzelfeldt @ 2011-09-16 12:38 UTC (permalink / raw)
  To: unicorn list

On 16/09/2011, at 9:11 PM, Eric Wong wrote:
> :ThreadSpawn + worker_connections=1 and the (default) :Base option are
> almost the same in Rainbows! if you don't want to worry about your app
> being thread-safe at all.

my reason for intending to run worker_connections=1 isn't avoiding threading issues, but to allow app reloads without leaving around old instances of the app in server processes that are handling a 2+ hour upload. I passed on Rainbows::Base just because of the "not intended for production use" comment in the docs.


> Rainbows! can (and does by default) limit upload sizes
> (client_max_body_size) for handling untrusted clients who may try to
> run you out of space.

ah, that's a good point. I'll be fronting through Pound for SSL, but having the server process limit upload size would be worthwhile.


> Since performance/scalability isn't your concern, it depends on whether
> you trust your clients to not upload until you run out of disk space.

I trust them to not do that on purpose, but that doesn't mean a lot. :/


cheers

Russell


-----
Russell Muetzelfeldt <russm@slofith.org>
Mundus vult decipi, ergo decipiatur.

_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Rainbows! or unicorn?
  2011-09-16 12:38   ` russell muetzelfeldt
@ 2011-09-16 17:00     ` Eric Wong
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Wong @ 2011-09-16 17:00 UTC (permalink / raw)
  To: unicorn list

russell muetzelfeldt <russm-rubyforge@slofith.org> wrote:
> On 16/09/2011, at 9:11 PM, Eric Wong wrote:
> > :ThreadSpawn + worker_connections=1 and the (default) :Base option are
> > almost the same in Rainbows! if you don't want to worry about your app
> > being thread-safe at all.

<snip>

> I passed on Rainbows::Base just because of the "not intended
> for production use" comment in the docs.

Ah, Base and worker_connections=1 (anywhere) is risky for dealing with
untrusted clients directly.
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-16 17:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-16 10:19 Rainbows! or unicorn? russell muetzelfeldt
2011-09-16 11:11 ` Eric Wong
2011-09-16 12:38   ` russell muetzelfeldt
2011-09-16 17:00     ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).