Ruby on Rails Sunday, July 28, 2013

Well my ideal situation would be Nginx with puma on the vps. However I couldn't get nginx to recognize the vhosts based on the blog articles I followed as examples, so I went to Apache/Passenger, but too slow. Then Apache/Puma, much faster.

Thanks for your responses, can you point me to any article or instructions on how to get it setup with Nginx and Puma with a way for Puma to auto start when Nginx starts.

I have some legacy coldfusion apps to move off a windows host, but I think I'll just put them on a separate vps and keep the Rails apps on its own vps. The benchmarks seem to indicate Puma as being lightest/fastest at this time, it was a v noticeable diff between Passenger and Puma.

On Sunday, July 28, 2013 5:31:39 PM UTC-7, tamouse wrote:


On Jul 28, 2013, at 8:08 AM, Hassan Schroeder <hassan.s...@gmail.com> wrote:

> On Sun, Jul 28, 2013 at 12:40 AM, Exel Dev <exe...@gmail.com> wrote:
>> Is there a way to get an Apache vhost to start Puma automatically on a Rails
>> app?
>
> What is an "Apache vhost" ??

I hope this was just a joke. nginx is quite adept at dealing with virtual hosting as well.

>
>> I'm installing Apache and Puma on a linux ubuntu 12.04 box, first I tried it
>> with Passenger but it seemed quite slow compared to Puma.
>>
>> Is there a preferred recommended setup that's more ideal?
>
> I use nginx to proxy to Puma, but as far as "starting automatically"
> the Linux-standard approach would be to write a start/stop script for
> /etc/init.d/.  Alternatively, use something like monit to manage any
> necessary processes (Puma, memcached, etc.)

What is ideal will always depend on your application and usage profile. Many things work, some better than others, again, depending on each case.

Hassan mentioned nginx, I am using nginx as well, with several unicorns. I haven't done extensive research, I just knew that Apache+Passenger was going to wreak havoc on my already bloated VPS. If you are just using a single server the nginx+puma/thin/unicorn things works well.

Unless you are using your linux box for serving up multiple vhosts and web apps in PHP, Perl, and such, it really makes more sense to me to put in a trim, fast web server like nginx for tossing back static content, and something to manage the Rails stuff such as puma.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5d665bd2-6cac-4707-98f0-21eea34d0242%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment