[Mongrel] Uploading Large (100mb+) files

Rogelio Samour rogelio.samour at gmail.com
Tue Nov 28 14:47:28 EST 2006


Matt: I definitely want to use the mongrel_upload_progress* (I realize I
call it something different earlier :-p)

Can you post your setup and how you have this running with one mongrel? Are
you using DRb? (I am and I just ran ruby lib/upload.rb and it printed the
following:
1164740868: Added
1164740868: Finished
1164740868: Added
1164740868: Marking
1164740868: Checking
... Last 2 lines Many times
1164740868: Finished

But again. I have no idea where the file went. :-/

-rjs-

On 11/28/06, Matt White <stockliasteroid at gmail.com> wrote:
>
> If you use something like mongrel_upload_progress, the single-threadedness
> of Rails is no problem because Mongrel will intercept the upload and not
> hand it off to Rails until it's complete. That's what I'm doing at the
> moment, and my app runs just fine on one Mongrel.
>
> If you're running large file uploads, I would recommend looking into it
> anyway, because your users will surely want some kind of update about how
> their upload is going.
>
> Matt
>
> On 11/29/06, Vishnu Gopal <g.vishnu at gmail.com> wrote:
> >
> > If you're using Rails with Mongrel, file upload currently sucks. If you
> > have two mongrels running (say) and two users upload two large files, your
> > entire app will be hung just serving those requests. This is because Rails
> > can't run safely multi-threaded, and it's not Mongrel's fault.
> >
> > An upload only Mongrel could (and should) be written in a framework
> > other than Rails. Both Camping and Merb are good choices. In this instance
> > you don't need many mongrels since even 1 can simultaneously serve many file
> > uploads. So you'll ideally have 1 server where you have one or more mongrels
> > running your file upload app, and use that to accept uploads. This is what
> > we do at SlideShare: we have a custom Camping app to accept file uploads.
> >
> > Your frontend webserver or load balancer would redirect all requests to
> > /upload (say) to your uploader mongrel running at it's own port. And all
> > other requests can be served some other way. We do this through lighttpd
> > proxying.
> >
> > HTH
> > Vish
> >
> > On 11/28/06, Rogelio J. Samour < rogelio.samour at gmail.com> wrote:
> > >
> > > I have an Apache 2.2.3 (mod_proxy_balancer) frontend server that does
> > > not have mongrel installed. It does proxy requests to several other
> > > mongrel-only servers (each running 2 mongrel processes). Each mongrel
> > > node has the same rails code-base and it's working perfectly.
> > >
> > > However, my question is when I add an upload file form... where is it
> > > going to physically put that file? I mean since it's hitting either
> > > one
> > > node or the other, so how does mongrel deal with that? and how or
> > > where
> > > do I tell it to accept large files (100mb+) ?
> > >
> > > I have read on having an upload-only mongrel process, but again how
> > > will
> > > all the other mongrels know to post the file to it or to a specific
> > > folder somewhere? Direction on this would be greatly appreciated!
> > >
> > > Thanks for your help on this. I searched the forum and didn't find
> > > anything specifically dealing with this. I have also checked the
> > > mongrel
> > > docs and most of the setups talk about mongrel_upload_progress plugin
> > > and/or the mongrel_cluster setup...(I may have missed something :-/)
> > >
> > >
> > > cheers,
> > >
> > > -rjs-
> > >
> > > p.s. mongrel ROCKS!
> > >
> > > _______________________________________________
> > > Mongrel-users mailing list
> > >  Mongrel-users at rubyforge.org
> > > http://rubyforge.org/mailman/listinfo/mongrel-users
> > >
> >
> >
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> >
> >
>
>
> --
> Matt White
> -----------------------
> Thermal Creative
> http://blog.thermalcreative.com
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061128/12cc91e5/attachment.html 


More information about the Mongrel-users mailing list