I'm a PHP developer, I have always developed on a LAMP environment and it's all gone well 'til now. At the moment, I am developing a PHP web application, still on apache and without the use of any framework.
PHP-fpm will serve dynamic and static contents on the front-end, while php-cli scripts will run in the back-end through some cron-jobs (the actual application).
This time, I am facing up the concurrency problem because this web site will be used by multiple users. The estimated number of concurrent logged-in users is 50-75, at least for the start-up period.
I have read almost everywhere that Nginx is better than Apache in this kind of work; I've read a lot of articles which explain the differences between them, I've read performance stats, but nowhere have I found the actual threshold (of concurrent users) over which you should switch from Apache to Nginx.
I'm wondering this just because, as I said above, I have always worked with Apache and a change in web server is a significant choice, in particular regarding the time I will have to spend on Nginx documentation in order to completely understand its behavior/functionalities. Indeed, I have tried to set up a LEMP server, but Nginx sounds like Arabic to me at the moment.
After this "short" introduction, here are my questions:
- What is the reccomended threshold (number of users) over which switch to Nginx?
- Assuming my web site will never have more than 300 online users at the same time, do i really have to spend weeks to study Nginx, even if it is a bit faster in serving contents?
- Are there significant differences in terms of security between Apache/PHP-fpm and Nginx/PHP-fpm?
- Last but not least: i've just switched from OVH to Digital Ocean. Digital Ocean seems fantastic. They provide you pre-built images of a LEMP server. How much can i rely on Digital Ocean's Nginx's security settings? I ask this just because i searched a lot of hardening tips for Nginx, and most of them are performed before build Nginx itself. Anyone who is using Digital Ocean's LEMP server can help me?
NOTE: I imagine this info will be important in order to reply: Prod. server (at start up time) will be: 4c/8t intel - 8gb RAM - SSD hard disk
Thank you very much.