Any news on the Apache Best Practice Deployment instructions? I''m getting ready to set up a production server, and would prefer to use Apache and Mongrel/Cluster. Don''t think I''ll be able to get the latest Apache though. Do I have to proxy through Pound or something to handle multiple mongrel instances? Any pointers? Any help appreciated, Brett
On 31/07/06, Brett Walker <lapomme00 at gmail.com> wrote:> Any news on the Apache Best Practice Deployment instructions? I''m > getting ready to set up a production server, and would prefer to use > Apache and Mongrel/Cluster. Don''t think I''ll be able to get the > latest Apache though. Do I have to proxy through Pound or something > to handle multiple mongrel instances? Any pointers?I''ve got a brief guide here (must get around to writing it up properly): http://schwuk.com/articles/2006/06/13/hosting-rails-applications-with-mongrel-apache-2-mod_proxy-on-debian-stable You will need a load balancer if you''re not using Apache 2.2. Cheers. -- Dave Murphy (Schwuk) http://schwuk.com
On 7/31/06, Dave Murphy <schwuk at gmail.com> wrote:> I''ve got a brief guide here (must get around to writing it up properly): > > http://schwuk.com/articles/2006/06/13/hosting-rails-applications-with-mongrel-apache-2-mod_proxy-on-debian-stable > > You will need a load balancer if you''re not using Apache 2.2.Dave, thanks for the pointer. This will help. It looks like you''re running only one Mongrel instance, is that right? Cheers, Brett
On Jul 30, 2006, at 11:36 PM, Brett Walker wrote:> Any news on the Apache Best Practice Deployment instructions? I''m > getting ready to set up a production server, and would prefer to use > Apache and Mongrel/Cluster. Don''t think I''ll be able to get the > latest Apache though. Do I have to proxy through Pound or something > to handle multiple mongrel instances? Any pointers?I basically do the same that Dave did - actually - I just basically do the same thing as: http://mongrel.rubyforge.org/docs/mongrel_cluster.html basically for the init script and configuration file-based start/stop. And: ProxyPass / http://127.0.0.1:mongrelport/ ProxyPassReverse / http://127.0.0.1:mongrelport/ in the configuration file for each Vhost I''m running on the box that Apache and the Mongrel+Rails app is located at, and where mongrelport corresponds to the configuration for mongrel+mongrel_cluster ( Where X depends on which port I defined in the yml file mongrel_cluster) It actually just turns out to be *that* simple. (simple enough that I''m perpetually worried I completely missed something) I''m using Red Hat''s Apache 2 distribution (actually the beta stack version: 2.0.55) Jason -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jason Young -- Systems Manager, eXtension http://about.extension.org/wiki/Jason_Young ______________________________________
On Jul 31, 2006, at 3:21 AM, Dave Murphy wrote:> You will need a load balancer if you''re not using Apache 2.2.Why exactly? I have relatively low traffic sites, but I''m not load- balancing - and as far as I know (which is one of the biggest self- lies in system administration I know) - I''m not having any delivery problems. At what traffic point ls LB really necessary? Jason -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jason Young -- Systems Manager, eXtension http://about.extension.org/wiki/Jason_Young ______________________________________
I would assume two requests coming in at the same time would really be the first point you would consider getting a load balancer in some form or fashion. If you have a lot of long web requests (searches, big calculations, etc.) you tie up the web request for any users. Of course, if the web request completes in a matter of milleseconds, you''ve made your user wait milliseconds. Probably not a big deal. Load Balancing has the connotation of requiring Big Hardware, but can be as simple as Apache''s mod_proxy_balancer looking at incoming requests and deciding which mongrel instance in a mongrel_cluster to route to. I personally have 2 instances running on several low traffic sites, and you can see in the Apache built in mod_proxy_balancer manager screen that the 2nd one hardly ever kicks in. There are some most excellent docs that even tell you how to mod_deflate and have the Apache instance serve up static content (one thing that mongrel does well, but not as well as it serves up ruby) and configure a 3 mongrel_cluster setup. Coda Hale''s comes to mind: http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/ Only using httperf or ab or siege or anything to simulate the kind of traffic you expect will tell you if you need a load-balancer. I wouldn''t add one before at least doing that. On a side note, if you do have long running web requests, might I suggest using backgrounDRb to free up the web request. Cheers, -- Charles Brian Quinn self-promotion: www.seebq.com Highgroove Studios: www.highgroove.com Slingshot Hosting: www.slingshothosting.com On 8/1/06, Jason Young <jason.young at extension.org> wrote:> > On Jul 31, 2006, at 3:21 AM, Dave Murphy wrote: > > > > You will need a load balancer if you''re not using Apache 2.2. > > Why exactly? I have relatively low traffic sites, but I''m not load- > balancing - and as far as I know (which is one of the biggest self- > lies in system administration I know) - I''m not having any delivery > problems. At what traffic point ls LB really necessary? > > Jason > -- > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Jason Young -- Systems Manager, eXtension > http://about.extension.org/wiki/Jason_Young > ______________________________________ > > > > > > > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
Just ran across this blog post by Ezra (from a couple months ago) that could come in handy: http://brainspl.at/articles/2006/06/12/apache2-2-vhost-template-for-mongrel-clusters Cheers, Brett
On 01/08/06, Brett Walker <lapomme00 at gmail.com> wrote:> Dave, thanks for the pointer. This will help. It looks like you''re > running only one Mongrel instance, is that right?Yes. Because of low memory on the host, I decided to stick with one instance. Cheers -- Dave Murphy (Schwuk) http://schwuk.com
On 01/08/06, Jason Young <jason.young at extension.org> wrote:> > You will need a load balancer if you''re not using Apache 2.2. > > Why exactly? I have relatively low traffic sites, but I''m not load- > balancing - and as far as I know (which is one of the biggest self- > lies in system administration I know) - I''m not having any delivery > problems. At what traffic point ls LB really necessary?Sorry I should have qualified that with "if you want load balancing". I''ve avoided it due to memory constraints and have not had any real problems on a low traffic site. My rule of thumb for load balancing would be anything where it is going to cause you pain/embarassment/financial loss if a user has to wait for a unresponsive site. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com
On 01/08/06, Jason Young <jason.young at extension.org> wrote:> basically for the init script and configuration file-based start/stop.I''ve written a howto on rolling your own init scripts for single mongrel instances: http://schwuk.com/articles/2006/06/29/daemonizing-mongrel It could easily be adapted to use config files and/or clusters.> ProxyPass / http://127.0.0.1:mongrelport/ > ProxyPassReverse / http://127.0.0.1:mongrelport/Because I''m using a bunch of rewrites to enhance caching etc. I not using ProxyPass anymore - I just use a proxying rewrite. I''ll write this up on my website as soon as I get the chance. Cheers, -- Dave Murphy (Schwuk) http://schwuk.com
On 01/08/06, Jason Young <jason.young at extension.org> wrote:> ProxyPass / http://127.0.0.1:mongrelport/ > ProxyPassReverse / http://127.0.0.1:mongrelport/ > > in the configuration file for each Vhost I''m running on the box that > Apache and the Mongrel+Rails app is located at, and where mongrelport > corresponds to the configuration for mongrel+mongrel_cluster > > ( Where X depends on which port I defined in the yml file > mongrel_cluster) > > It actually just turns out to be *that* simple. (simple enough that > I''m perpetually worried I completely missed something)I think you are. My impression from reading the above is that a) your using mongrel_cluster and b) you''re *not* using mod_proxy_balancer (because it''s not available for Apache 2.0). If both of these are true, then all requests are being served by the first member of the mongrel_cluster - the others will never be touched. Is this the case? Cheers, -- Dave Murphy (Schwuk) http://schwuk.com
On Thu, Aug 03, 2006 at 07:59:02AM +0100, Dave Murphy wrote:> On 01/08/06, Jason Young <jason.young at extension.org> wrote: > > basically for the init script and configuration file-based start/stop. > > I''ve written a howto on rolling your own init scripts for single > mongrel instances: > > http://schwuk.com/articles/2006/06/29/daemonizing-mongrel > > It could easily be adapted to use config files and/or clusters. > > > ProxyPass / http://127.0.0.1:mongrelport/ > > ProxyPassReverse / http://127.0.0.1:mongrelport/ > > Because I''m using a bunch of rewrites to enhance caching etc. I not > using ProxyPass anymore - I just use a proxying rewrite. I''ll write > this up on my website as soon as I get the chance.I already did so some time ago (for Apache 2.0): http://www.jkraemer.net/articles/2006/07/07/mongrel-apache-and-rails-on-debian-sarge In the second half of the post, below Configuration / Apache there''s a snippet of Apache config like I use it in my VirtualHost sections. It uses rewrite rules for serving static files via Apache and sends all remaining requests to localhost:8001. What actually listens on that port doesn''t matter in terms of Apache configuration - it might be some load balancer like Pen, or just a single Mongrel instance. Jens -- webit! Gesellschaft f?r neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Kr?mer kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66
Apparently Analagous Threads
- what should be correct .conf file for being served by apache for static content
- Apache rewrites with mongrel
- Apache 2.2 + Mod Proxy Balancer + Mongrel - Hot Linking Protection?
- problem serving pdf files
- mongrel cluster (+ Apache 2.2.4 + proxy balancer) not redirecting correctly