I'm designing a long-polling app to broadcast small changes very rapidly to, possibly, a large number of users. The app will run in tandem with a website running a fairly standard cms. They'll both be running on one server, and to begin with so will the database.
I come very much from a LAMP environment and I'm definitely a developer and not a sys-admin. That said I'm not afraid to try out some new things.
I've spent the day researching my options and I'm hoping people can answer some questions and give me some recommendations.
I have narrowed it down to these:
A. Apache and php for the website, Node.js for the app
B. Nginx and php for both the website and app
C. Nginx and php for website, Nginx and Node.js for the app
So the questions:
- How does Nginx handle PHP's non-multi-threadingness ;). Will PHP prove as much a bottleneck as Apache would have for long polling?
- I've heard it suggested that I use nginx as a reverse proxy in front of Apache and Node.js, is that a better solution than just nginx? If so, why?
- Which option have you used/would recommend?
Bear in mind that ease of set-up could be a factor, I'm fairly comfortable with Apache but I've only played with Node and I've never installed Nginx.
I'll happily provide clarifications if anyone needs them.