views:

36

answers:

1

I am building a PHP comet based application. Which web server should I use in the backend? Apache / nginx (this is what most forums say) or something else would be better?

+1  A: 

I would recommend not using PHP at all for this purpose. PHP is synchronous, therefore every open comet connection will block a PHP process (or Apache process if mod_php). Here an asynchronous language shall be used, JavaScript for example. (See Node.JS. If you are using comet for a chat, have a look at node_chat)

nikic
Yes I saw it. But, that will require me to rewrite the whole application. Is there a way I can port the code to Node.JS?
Aman Kumar Jain