Nginx & Wordpress MU

April 4, 2010

We’ve been working on a huge, soon to announced project, that involves Wordpress MU. I’ve been working for months on this, and I’ve really got stuck into the deepest and darkest parts of Wordpress MU. I’ve got to say, I’m a fan of Wordpress. The code is nice to work with, its well documented (for the most part) and it just works. As opposed to some of the other open source CMS and blog engines out there.

But, I just kept hitting performance bottle necks with it. Which, is to be expected when you’re serving heavy php pages with lots of MySQL reads. I went down the well traveled road of installing various caching plugins (WP Super Cache was my favorite), and they made a huge difference – but still, performance not quite where I felt it should be. This project is for a very high traffic site, so its really worth squeezing every last percentage of performance out of your code.

I was about to roll out some kind of reverse caching proxy, such as Squid or a server cluster when I started to debate changing out Apache for something lighter and faster. I’d heard good things about lighthttp and Nginx. I was a little nervous, as this is a live production site, but the performance gains could be worth it. When I learned that wordpress.com uses Nginx, that sealed it for me. Nginx it is then!

So, after much trepidation, I pulled the trigger and started to rebuild the app on a new server running Nginx (a LEMP stack, as opposed to LAMP). It took me a long and arduous 2 days to get everything back up and running (on a dev server first, customers didn’t experience any downtime), but man, first impressions blew my mind. It is way faster, especially for serving images. I intend to write a detailed post about the setup, but for now here is a graph that shows a quick comparison. The site is monitored by Site24×7, and the following graph shows the ping times for a given page. This page had very simple content, so I wasn’t expecting much. But, see for yourself. Its a big difference, note that the site was cached before and after the change it was not cached. Once I roll out caching on the new nginx server then it will be fair comparison, i.e. this graph makes it looks like nginx is slower then it really could be.

Some quick lessons learned, the hard way.

PHP sessions did not work, I spent hours trying to get them to work under nginx but then just decided it was time to roll out a MySQL based session system, its more secure and portable and only took about 2 hours to get up and running on the live site. I’ll post a how-to article soon.

If images aren’t being served correctly it could be because FastCGI php cache’s directory needs to be owned by the same user that Nginx is running as. Obvious I know, but still, not so obvious at the time. Well, lots of things aren’t obvious at 2 in the morning!

I promise I’ll post more details shortly.

Categories: Products, php
Tags: , ,
Comments (0)

eTasking & Agile Development

eTasking, agile project planning made simple

We’ve worked on a few projects over the years where we’ve adopted agile project planning practices. As a result, we’ve used a few of the tools that are out there, such as Rally, and just haven’t been that impressed (not to mention the cost!). It seems to me that the beauty of Agile is that its simple, and I feel like the tools that go along with it should be too. I’m a big fan of 7 Signal’s Basecamp, and use it a lot. Its good for what it is, but its not a project planing tool (which is fair, as its not supposed to be).

When we run agile, most of the actual day-to-day planning activity focuses around a white board, with basically a bunch of post-it notes that we physically move around. So, why is it that none of these project planning tools for Agile seem to be as simple? In my experience, they seemed to get bogged down by trying to give us too many features.

So, at Ad Astra we developed our own tool, trying to keep it as simple as possible. And, finally, we’ve decided to release it into the wild as a free service with the hope that other people will find it useful. We’re going to open source the code, if we have any interest from the community to do so. So, if you’re interested, send us an email and we’ll get you hooked up with the code repo. Its Beta software, and a work in progress – when we have free time!

Check it out at etasking.com.

Categories: Products
Tags: , , , , ,
Comments (0)