Saturday, July 10, 2010

TurboGears and Amazon EC2 Benchmarking, Part 4: Conclusions

Reviewing my methods, and the results I got, I found out quite a bit about TurboGears. I learned about how it will perform in real world scenarios, and I learned how to figure out the level of hardware I will need to accommodate a community. So, what does this mean for you?

For TurboGears, this is about answering the question: "How well does this scale".

The results of that question cover a very limited set of variables: How much hardware do you need to scale? What version of TG provides the best performance? Is Genshi or Mako the better performing template engine?

That's it. No more, no less. By and large, the numbers speak for themselves. The only gotcha in this is that those numbers are for all the dynamic pages. They do not cover the static pages, and that is done deliberately. I configured Apache to handle serving static CSS and JavaScript files. You get the full speed of Apache when the files are static, and then you get the full benefits of TurboGears for all your dynamic pages.

If you need to deploy and scale your TurboGears application, look at those numbers, use the definition of an Amazon EC2 Compute Unit (along with how many each instance provides), and then comes the hard part: You must estimate how many dynamic pages are going to be viewed at a time. I would then leave an additional 50% capacity, just as a buffer.

So, if you expect your site to attract, at peak, 10 dynamic page views per second, and you're on TG2.1b2 with Genshi, then you can get away with the smallest instance. The requirements sound like you need something huge, but you really don't. Remember what I said in yesterday's post: 864,000 dynamic page views per day on something that small. That's a lot of page views, and will support a very active community.

I'm glad to be working with TurboGears. Lots of power, lots of scalability, and it's all built in. I just have to use it.

Now, as I close out this series, I'd just like to say thank you to the developers who work so long and hard with TurboGears. They make things like these posts possible.

No comments: