Mod_Rails Released - Post your Thoughts

http://modrails.com/

Mod_Rails is out, so what do you think?

ChessMess wrote:

http://modrails.com/

Mod_Rails is out, so what do you think?

I think that I might give it a try out.

Let's see:

- Faster than mongrel, on par with thin - Thoroughly tested and profiled for stability - Two lines of installation and a small snippet of code in apache config - Free to use and completely open source

I would say this is an exciting day for rails.

So far so good. I like not having to deal with cleaning up after mongrel.

I have to reconfigure my capistrano scripts to reflect this, but i like what I see.

ChessMess wrote:

This looks great. Would one ever use this in a development/testing environment?

Thanks

ChessMess wrote:

http://modrails.com/

Mod_Rails is out, so what do you think?

I added a .htaccess file to my app root containing:

<IfModule mod_rewrite.c>    RewriteEngine on    RewriteRule ^$ public/ [L]    RewriteRule (.*) public/$1 [L] </IfModule>

So now i can drag and drop the whole app into the folder without pointing the root to the public folder (one extra step less).

I really like it.

Great day for Ruby on Rails.

We do not have a single reason now to envy PHP or Asp.Net, when it comes to deployment.

I am full of cheers...

lets see, what rubinius does with with such inspiration.

John Harrison wrote:

I added a .htaccess file to my app root containing:

<IfModule mod_rewrite.c>    RewriteEngine on    RewriteRule ^$ public/ [L]    RewriteRule (.*) public/$1 [L] </IfModule>

So now i can drag and drop the whole app into the folder without pointing the root to the public folder (one extra step less).

I really like it.

John,

Would you mind explaining what you mean? If you still have to set up a virtual host in your apache config, what step are you saving since you have to define DocumentRoot? If you are talking about being able to use the same domain and have the Rails app appear "under" it, such as

www.mydomain.com/my_rails_app

wouldn't that require something like a prefix in the app so your generated routes would be correct? I'm thinking of the situation where you have to apps living next to each other like

www.mydomain.com/rails_app_1 www.mydomain.com/rails_app_2

and how you'd need a prefix in both apps for the routes to work.

I might be missing something, though. I'd really like to be able to have many apps live under one domain easily.

Thanks, Phillip

Exceptional! Any chance we'll see a Windows executable, maybe packageable with Instant Rails?

Best regards, Bill

I think this is one of the best things to happen to RoR lately.

We have been testing mod_rails over the past 48 hours or so and have it installed on our most recent shared server for clients to use. Thus far we're skeptical if it will be more stable than a Mongrel cluster in a shared environment but it certainly works as expected; upload your files and you're done (and it's speedy, too).

Testing with a fresh install of redmine-0.6 on RHEL5 w/ Apache 2.2.8, Mongrel 1.1.4, ruby 1.8.6 PL114, passenger 1.0.1 we've noticed a few things:

1) The app fired up in a Mongrel instance uses 35MB RES.

2) The app fired up with mod_rails loads an ApplicationSpawner (40MB RES), a rails instance (39MB RES), and a FrameworkSpawner (25MB RES). The FrameworkSpawner only seems to run if you have Rails gems frozen in the app.

3) If the app hasn't been hit within the RailsPoolIdleTime the ApplicationSpawner/RailsInstance/FrameworkSpawner all die away. The next hit takes a few seconds for these to load again (remind you of something?).

At this point for shared clients we're still recommending Mongrel clusters over mod_rails (Mongrels on average take less memory out of your quota and are 'always on') but are happy to offer both. Let me know if you'd like to see any further details on the above or have any other questions.

Cheers, ~William http://www.hostingrails.com http://www.hostingrails.com/mod_rails_hosting

@William,

What about those with many different rails apps, all with low volume? So for example, if I had 10 apps, (each with <5 visits per day) I would need 10 mongrels. Using you example numbers, that is 350MB. However, if I used mod_rails, and I had the same 350MB available, would it share the available memory between only the running apps? That would (in theory) make the running apps faster, after the initial slow requets.

Thanks, Paul

Hi Paul, with <5 visits per day per app I don't think you'd see much of a functional difference overall between mod_rails and mod_fcgid; the former may be more stable (hopefully) but the ladder takes much less memory, is widely supported, and is therefore much less expensive. Mod_rails was built for speed, stability, and robustness with ease of deployment, but as of passenger-1.0.1 our tests have shown that for an app with a steady stream of visitors this comes at the cost of requiring more memory than the two most common methods of hosting Rails in a shared environment combined. At the end of the day, it appears that if all goes well mod_rails will be for those who won't mind paying a lot of RAM for a bit more performance and deployment freedom.

~William http://www.hostingrails.com

DyingToLearn wrote:

Just installed Passenger, and I love it. Works flawlessly with all of my Rails apps. However, when pointing my browser to all of my apps, it takes a while to load (around 30 seconds) but then it's really fast after that. Is this normal, do I need to make any optimizations, or is it just because of my sluggish iBook?

Install and setup was easy. Production logs indicate rails performance is faster.

Main problem I have right now is that static content (images, js files) seem to be taking 2 to 3 longer to download than when I was using Apache/Mongrel (measured using firebug's net tab).

Anyone else seeing an issue with static content download speed?

William,

Could you have a look at http://groups.google.com/group/phusion-passenger/browse_thread/thread/e6dc620227ed7b4c and repeat your experiment ?

Passenger is designed to work best with GC enabled ruby patch http://izumi.plan99.net/blog/index.php/2008/01/14/making-ruby’s-garbage-collector-copy-on-write-friendly-part-7 from the memory point of view. I'll need to convince Hongli/Ninh to make that information a bit more clear :slight_smile:

With GC patch, each rails application can share the framework code in memory and that results in huge memory savings.

-Pratik

William,

Could you have a look athttp://groups.google.com/group/phusion-passenger/browse_thread/thread… and repeat your experiment ?

Hi.

Thanks for explanation this Pratik. I wanted to say the same thing but you beat me to it. :slight_smile:

Passenger is designed to work best with GC enabled ruby patchhttp://izumi.plan99.net/blog/index.php/2008/01/14/making-ruby%E2%80%9... from the memory point of view. I'll need to convince Hongli/Ninh to make that information a bit more clear :slight_smile:

With GC patch, each rails application can share the framework code in memory and that results in huge memory savings.

-Pratik

We're going to publish this work as "Ruby Enterprise Edition". Because of the amount of work that had to be put into Passenger's release, we haven't had the time to do that yet. Please watch www.rubyenterpriseedition.com (or our blog) for updates.

Regards, Hongli Lai (phusion.nl)

Mod Rails ist just great, the only problem i currently have is how to setup basic authentication so that you have to log in to get to the application?

If I try the following: <Directory "/var/rails/mdd/current/public">   Options FollowSymLinks   AllowOverride None   Order allow,deny   Allow from all   AuthName "Login"   AuthType Basic   AuthUserFile /var/rails/mdd/.htpasswd   Require user mdd </Directory>

Then only my static assets are password protected.

How can i solve this?

TIA Andy

It shares code even if I vendor Rails?

--Jeremy

The first thought when i read about mod_rails was: "woooooooooooow ,cooool", but the i read the William Li's post, and then it became a "mmm...seems cool..." How much does mod_rails require instead of mongrel? I've to setup a server with apache and 3-4 rails apps, would be better going with mongrel or mod_rails ? and, does happen frequently that the processes are killed and then it takes "a lot" to restart (fcgi like :frowning: )? Thanks