Posts Tagged: optimization



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 →



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 →