Posts Tagged: passenger



Prelude
This post is the final part of a series on Optimizing your server. Check out Part 1 (Apache and Passenger Architecture) and Part 2 (Apache and Passenger Directives) of the series if you have not already. In this post, we will look at gathering metrics for your application and tuning the directives accordingly.
Continue reading →



Apache, Passenger and other server alternatives: rails

 by abhishek  on   11 Aug 2010

This post is a part of the series of articles about choices available to a rails developer. Previously we discussed about the choice of databases. This time it is about application and web servers. We can make the choice of an application and a web server separately, but as they are so closely related that it is better to look at them together.


Web Server

It is well known what a web server does, but for starters - the web server receives the HTTP requests first, and then responds by either serving the page requested or directing the request to our rails application server. The major web servers market-share wise (survey graph below) are Apache, IIS(Microsoft), nginx, GWS(Google) and lighttpd. We as rails developers are interested in all these except IIS and GWS. Not IIS because it is closed source and proprietary and not GWS because it is used internally by Google. Apache, nginx and lighttpd are all popular among rails developers.

Apache

apache logo

The most popular web server  in use. It supports a wide variety of features, and is reasonably fast as well. Many of the essential features are provided as compiled modules that extend the core. These include support for server side scripting languages like perl, php, tcl, python; support for authentication; support for ssl and tls  and compression support.

The only issue with apache is that because it is process based, it spawns too many threads when there are too many simultaneous requests. This leads to excessive memory usage, so the performance can drop in restricted environments under heavy load.

Continue reading →



Prelude

In the previous article, we went through the basic architecture of Apache and Passenger. Now I’ve been told that its a bit too much to digest in one shot but it’ll all make sense when all the 3 articles are read together. If not, you’re always welcome to drop a question in the comments section and I’d be happy to help.

Assumptions

In this article, we will be looking at the primary directives in Apache and Passenger for optimization. The rest of the series is specific to the case where a single RoR application is running on the server (say, TweakMyApp).

Continue reading →



So here’s my problem. I’ve written an RoR application and I’ve managed to get a server up and running with Apache and Passenger. Im paying quite a bit for my server, but I have no idea if my application is effectively using the server’s resources. How do I gather metrics to make sure that I can configure my web server(Apache) and application server (Passenger) optimally to serve my application?

I realized that there are 3 parts in the answer to this question. First, we need to understand how Apache and Passenger are designed to handle incoming HTTP requests together. Second, we need to understand what the various directives available for Apache and Passenger mean. And finally, we need to see how we can gather metrics and tweak these directives to the optimal setting.

Im going to address each of these 3 parts in 3 blog posts. So lets get started with the first, how Apache and Passenger are setup to work together.

There is an explanation in the Passenger docs on Passenger’s Architecture but frankly, I could not digest it in one read. So I’m going to summarize it for our purposes here.

passenger architecture mindmap

mod_passenger sits in the control process and every child process of Apache's

Continue reading →