Featured Post

Rapid Growth Can Lead to Rapid Decline

I am fortunate to work for a company that is growing extremely fast, right? Although that sounds great, company growth can be a very destructive force indeed. With growth you risk losing control of your every days tasks which you take for granted, such as assuming everyone knows the best practices...

Read More

Cherokee vs Apache : An alternative web server

Posted by Craig Strong | Posted in Cherokee, Development, Product Reviews, Software Reviews, Technology / Hardware, Web Servers, Zend Framework | Posted on 07-05-2010

Tags: , , , , , , , , , , ,

20

As I have been developing for the web for over a decade, I have become comfortable with tools and technologies which have helped me get the job done. Some of these technologies I have seen evolve and progress into what are now essential and very powerful solutions. I have established an affinity with many of these tools and without doubt the Apache web server qualifies as such a technology for me.

Using Apache over the years as my main web server, I have produced all types of software solutions for many diverse businesses within many different industries.  Apache has served me well and I am an advocate of the old saying ‘If it’s not broken, why fix it’ (within reason). Until recently that is….

Over the past few years in the distant background I have heard mention of Cherokee as being a viable alternative to Apache, with some claiming it offers benefits. These have been whispers registering in the distance, but didn’t sound interesting enough to pursue and invest my time as Apache was doing it’s job well. However recently these whispers became a little louder following a few conversations with a work colleague singing Cherokee’s praises. What caught my attention most from the conversations wasn’t simply that Cherokee was faster, but that Cherokee was much easier to use and quicker to configure. As I don’t like ‘shaving Yaks‘, my approach was that if I start hitting obstacles, I’ll leave it for another day which contains more than 24 hours; after all Apache is working well for me.

My local lightweight development environment consists of a Linux VM (Fedora) which I operate using VirtualBox. I deliberately reduce my VM’s resource allocation such as setting my RAM allocation to 512mb on my VM to encourage good code and to identify memory leaks. I have the other usual stuff setup such as Zend Framework, xdebug, MySQL etc. This was the machine which was going to carry out the test switch from my trusted Apache to Cherokee.

I disabled Apache and installed Cherokee using the supporting well written user guide. Within minutes Cherokee was up and running and there we NO problems! I was expecting some configuration hurdles as per usual, but nothing. My sites were running as if I was on Apache and there were no noticeable differences. I configured the logs to act as the same as Apache and all was set.

As I delved deeper into the setup guide I was pleasantly introduced to Cherokee’s administration interface. This was a pleasant surprise as I’m so used to hard coding configuration information into httpd.conf. This interface presents configuration options for all the usual server settings such as ‘Virtual Servers’, ‘Directory Sources’, ‘Logging’, ‘Security’ etc. The beauty of this is not that it’s simply a little prettier than the command prompt, but it’s quicker to use. You can configure your server settings simply and quickly which are two good properties to have on your side.

Although I was impressed so far, the remaining challenge that Cherokee must live up to for me is it’s speed advantages. In the spirit of keeping things simple and to get a loose overview on performance advantages I thought I’d simply use ‘Zend Controller’ which is bundled with ‘Zend Server CE‘ to test how many requests per second both Apache and Cherokee could handle in turn upon my humble local virtual machine. From these tests I obtained the following results :

Apache Web Server Results

Zend Controller testing Apache requests per second

Apache requests per second on local VM

Cherokee Web Server Results

Cherokee web server

Cherokee requests per second on local VM

As you can imagine I was quite impressed with what the results presented. The results roughly show that Cherokee could handle 2.5 times more requests per second that Apache! That is no small margin!

What does this mean for me going forward? Well the first things that went through my mind understandably were cost and time savings. Potentially this could reduce the need for more hardware. Less hardware means less purchase costs and less maintenance time. Obviously there are other factors to consider before jumping the gun, but Cherokee certainly has my attention now. I will definitely be including Cherokee in my future plans. An exercise well worth the time.

If anyone reading this has done the switch, please feel free to reply to this post with any feedback

Related Link : alobbs.com

Comments (20)

Hello, yes Cherokee has caught my attention too, and I am slowly trying to get it up and running to see if we can use it instead of Apache. The sticking point for me is a quite complicated .htaccess file which needs “translating”. I cannot find, for example, what the Cherokee equivalent of using the Apache .htacces [QSA] flag is.

I just heard about Cherokee by browsing some howto guides, then it came up again in a forum post.

I’ve been using apache because it’s tried and true, but recently started looking into the alternative ‘modern’ and ‘lightweight’ httpd such as lighttpd and nginx.

Will let you know how I fair with Cherokee, I have about 5 or 6 low-traffic sites to move from shared hosting to VPS, performance is always a concern but right now easy configuration is what I’m after!

Hi Nick, it would be great if you could let us know here how you get on? Shall look forward to it!

Nginx is also a good alternative

[...] Links « Cherokee vs Apache : An alternative web server [...]

Dude, many thanks for pointing me on to Cherokee!! Apache is such a memory hog these days when I’m running it in an Intranet setup for clients, etc.
I like installing web apps like vTiger, OrangeHRM and something to do groupware/project management (dotProject, Web2Project) so I use XAMPP (locally of course!) for this when Windows is the game in town. Plus, I’m interested in also setting up WebERP, SQL-Ledger or some nifty accounting app in an Intranet setting to get peeps down here off QuickBooks (eeew!).

I’ve also heard lots of good stuff about NginX but it appears that Cherokee gives better performance.
In addition, I have some ideas for a web financial app here in East Africa and I want it to be fast & secure so I was thinking of your other post where u installed Cherokee on OpenBSD. I really heart the Cherokee admin panel.

How does one set it up to use FastCGI instead of mod_php? Do u have any benchmarks to compare these 2 setups? And can u tell us how easy it was/is to do database load balancing??

You’ve given me a lot to think about. Cheers!

Thanks for the feedback and am glad to see you like the cherokee benchmarks.

Unfortunately I don’t have any stats on comparing FastCGI at the moment. Something to think about adding in the future when I get around to it. FastCGI can be installed using the a package installation for PHP5.2. If your not using packages/ports you’ll need to probably compile it as an extension. I have found cherokee to be just as good on all the *nix distro’s I have tried so it just depends on what your used to I guess.

I have to agree with your comment on the control panel, it’s way better than apache. Things like this make life a lot easier and can really save time.

Cherokee might be a nice alternative. But if you want a serious alternative, try Hiawatha. Build with security in mind and much easier to configure. I web interface is nice, but I still prefer text base configuration.

Maybe a Hiawatha vs Apache test?

http://www.hiawatha-webserver.org/

Sounds interesting; I have not tried Hiawatha. I think a Hiawatha vs Cherokee post would be better ? It says on the Hiawatha site “The world’s most secure and advanced webserver”. That is quite a claim! It would be interesting to see how it performs against the others. However one thing that seems to let it down is that looking at other posts and on the main Hiawatha site, it doesn’t support linux. It seems to only support OSX, BSD and Windows ?

Hiawatha definitly supports Linux. Take a look at the About page. Use the source tarbal and compile manually. It’s very easy.

at home i have a very simple static website that i use to download files or have fun with. i have used apache for years and like it. i have also used aol server, lighttp, nginx and many others. i found out about cherokee about a month ago and i must say it seems to fit the bill for me. i like the browser front-end for configuring. virtuals are very easy to set up. all seems well. let’s just see if there will be any hacks/exploits and will the author make good on that.

Here you have Apache, Cherokee, G-WAN, IIS, Kloned, Lighttpd, Nginx, and ULib – all on the same chart:

http://gwan.ch/imgs/gwan-lighttpd-nginx-cherokee.png

Cherokee does not look like the fastest. On this other test too, but it is not the slowest either:

http://dsec.com/imgs/gwan_cherokee.png

It’s important to take into account that a web server must be functional. In the case of G-wan’nabe, it is not even able to run any of the most common web apps. It’s basically useless speed. Besides, being a closed-source product, you are putting your whole infrastructure in risk.

I’d personally recommend either Cherokee or Nginx, both are open, feature rich, pretty fast and well maintained.

@bob

G-WAN handlers make it easy to plug PHP or Java, if you are unable to use its super-fast ANSI C scripts.

So when Cherokee boasts speed that’s great but when G-WAN (which is much faster than Cherokee) does is much better this is useless? Hmm…

And how can you sustain this claim about “you are putting your whole infrastructure in risk” [by using G-WAN] while – unlike Cherokee – G-WAN has never exposed users to critical security breaches?

Why these double-standards?

I am a big fan of Cherokee as well, I used to primarily use Apache to run my client sites, but ran into lots of load problems with it… I spent many hours tweaking and configuring Apache to no avail.

Once I found Cherokee, I’ve literally had no major problems in over 2 years. No tweaking, no text based config, just pure simplicity. It’s the only web server I run now on 15+ servers.

Hi Craig
I have managed to install and configure Cherokee as my web server, and let me tell you it is a dream.
Even with alot of users online my site is really fast.
It didnt take long to configure or setup but and the rewards are brilliant.

I do recommend using Cherokee as an alternative to Apache.

Now, any of you have Cherokee running on a server with a control panel ? (ie. cpanel, plesk, kloxo, etc).

I’d strongly encourage people to look at Cherokee as a viable alternative to Apache, especially for use in VPS environments due to its minimal memory utilization and CPU overhead. In my experience, it’s been unbelievably stable and efficient. 99% of the configuration you’d ever need to do is possible through cherokee-admin, which is a nice touch too. :)

hi,

if i migrate to cherokee, will all the extension be supported such as gdm for graphics etc. ?

.. and can it work with MySQL and PostgreSQL ?

thanks.

[...] is pretty well shaping up to give apache a tough fight, or at least that is what people are saying here, here and [...]

Write a comment