nginx, apache & cdn's
I am currently setting up a codeigniter & wordpress application using apache. I am now finding out more about nginx and the power it has.
The other option is using nginx as the sole webserver and remove apache completely. I do have some complex .htaccess rules, so not sure if it will all translate, but if I pursue this route, would i still see a performance improvement?
so the options are:
a) nginx + apache + cdn
b) apache + cdn
c) nginx + cdn
One interesting thing I found in my research is that if I can cache the whole page, then I can have that displayed before needing to involve the php interpreter. I can do this because I have an ecommerce site and most of my pages are not changing much and are not personalized.
The 3 ways of doing that are:
a) Use varnish in front of nginx / apache to serve the entire cached pages
b) Use nginx's cache module to cache the pages.
c) Use nginx as the web server along with memcached integration. This way, my codeigniter application would add the page to memcached and then nginx would deliver that page if it exists in memcached. further details are here:
Option b and c seem the most interesting, and leaning toward option c I think.
i currently am configuring 3 linodes:
a web server (512 MB)
master database server (1GB)
slave database server (512 GB).
should i place memcached on the web server and increase the memory or place it on the slave database server as it will probably have the lowest usage of the 3 linodes.
I also recommend using nginx's cache to cache your Wordpress pages. There is a Wordpress plugin that sends appropriate headers to nginx. I got something crazy like 9000 requests/second from a small Linode using this. I wouldn't bother using memcached for this.
i will look into the nginx cache further as well. who knew that there was so much performance improvement over lamp which i've been using over the past 5 years.