Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am considering using Nginx once again as the primary web server for a REST web-API we need to deploy very quickly(nginx initially chosen for its C10k properties.)

The initial implementation of the API will most probably be in PHP based on Codeigniter/Kohana, as that is what we know best. We are not a RubyOnRails shop, though we try to be RESTful as much as possible. :)

I understand for Consumer facing APIs (invoked from JS etc) , some kind of Caching is useful. We also have a B2B Private API that would be more transactional in nature. Caching wouldn't be very useful there, (I think).

So, I've been reading up all over the internet on the case to be made for recommending Nginx , to my client.

If the bottleneck is the PHP runtime and Database I/O, are there other advantages in choosing Nginx that the nginx users here, have come across?

[This is my first real question on SF; Please feel free to point out my poor community form, if you spot it. thanks]

share|improve this question

1 Answer 1

CodeIgniter is a good choice, and nginx is as well.

I don't know your API and how you implement things but the advantage that I always see in nginx is the extendability. You can use memcached as a cache directly in your webserver which is a great way to cache things even you extend the system later to several nginx nodes.

We dropped Apache-Support for long time already so I can't really tell how it is performing now, but for me I prefer the slim and lightweight way of a system.

nginx provides everything you need to get it up and running fast and secure.

Besides memcached you can also use the caching proxy feature which works very well. As highload sites move to nginx or lighttpd more and more, I don't see a reason why you should not.

My vote would go for nginx with PHP running via FastCGI.

Good luck, Ben.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.