Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
-FP Posted February 18, 2015 Posted February 18, 2015 Hi,Recently I started messing around with the IPS Suite, and I found several issues using FastCGI, for starters I get errors in the install process.So I switched the handler to Apache module, and everything seems to work perfectly. Weird, because I never had issues from 3.2 to 3.4.7 using FastCGI. What are the cons and pros of using one or the other to host this forum software?
Makoto Posted February 18, 2015 Posted February 18, 2015 My recommendation: use PHP-FPM and upgrade to Apache 2.4 if you can.https://wiki.apache.org/httpd/PHP-FPMWhen utilizing mod_php, Apache has to load the PHP interpreter for every single request it receives, including requests for static resources. This can quickly result in a large memory overhead that will significantly impact your ability to scale.By utilizing mod_php, you also have to use Apache's prefork MPM for compatability as PHP is not thread safe. You don't want this if you can avoid it. You can read a good overview of the differences between Apache MPM's here:http://serverfault.com/a/383634
RevengeFNF Posted February 18, 2015 Posted February 18, 2015 If he uses Nginx as a front end for Apache, then that problem is almost eliminated.
Makoto Posted February 18, 2015 Posted February 18, 2015 I don't think there's really much of a reason to use Nginx as a reverse proxy with Apache anymore. Apache 2.4 has made substantial improvements in regards to performance, good enough that you can pretty much choose to use one or the other without much loss.I still use and greatly prefer Nginx, but with Apache 2.4 running on its event driven MPM and utilizing native PHP-FPM support, I don't think there's that much of a difference anymore. Though I haven't actually tested or attempted to run any benchmarks myself (and I honestly don't really care to).
Rhett Posted February 18, 2015 Posted February 18, 2015 I recently did some stress testing on this actually, apache 2.4, vs nginx+apache 2.4, I saw roughly a 20% increase in performance by adding nginx into the mix. Of course this was stress testing and not real world testing, but I was impressed enough to make it my stock config moving forward when it can be done.
Makoto Posted February 18, 2015 Posted February 18, 2015 I recently did some stress testing on this actually, apache 2.4, vs nginx_apache 2.4, I saw roughly a 20% increase in performance by adding nginx into the mix. Of course this was stress testing and not real world testing, but I was impressed enough to make it my stock config moving forward when it can be done. Out of curiosity, why use Apache at all? Any particular reason you don't/can't just use Nginx with PHP-FPM as the backend instead of Apache?
Rhett Posted February 18, 2015 Posted February 18, 2015 Out of curiosity, why use Apache at all? Any particular reason you don't use just Nginx with PHP-FPM as the backend instead of Apache? Very good question, but my answer is there are many apps and software packages that require htaccess and apache specific re-write rules, rather than trying to have to mess with custom specific nginx rule sets to suit all of them, it's much easier to retain the ability of apache/htaccess by just setting nginx in front of it as a reverse proxy, then it follows all normal apache configs without any hassle.
maddog107_merged Posted February 20, 2015 Posted February 20, 2015 @Rhett, can you post your nginx / httpd configs for reference. I am still on the fence on leaving just my pure apache setup or switching over to nginx 100%. Like most people I am quite confortable messing with apache, but not so much nginx. So if I can just do both maybe thats the best case scenario even if I leave a bit of performance on the table.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.