Should I use PHP HHVM+Apache2 or PHP7+Apache2 or HHVM+NginX or PHP7+Nginx for the best performance?

Discussion QuestionsShould I use PHP HHVM+Apache2 or PHP7+Apache2 or HHVM+NginX or PHP7+Nginx for the best performance?
lillaprell asked 5 years ago
Should I use PHP HHVM+Apache2 or PHP7+Apache2 or HHVM+NginX or PHP7+Nginx for the best performance?
1 Answers
mauricedowden7 answered 5 years ago
I don't know much about hhvm..but I can help you with apache, Nginx and php7. I have used php7 + Nginx combination and achieved around 1Million requests per second in our stress and mixed load testing. I have also tested the same thing with apache2, Apache faces what is called the C10K problem – strictly speaking, difficulty supporting more than 10,000 connections at a time. (Apache falls well short of this goal.) Apache allocates memory to every additional connection, so it tends to start swapping to disk as concurrent connections increase. This sends site performance into a downward spiral and can lead the entire server to crash or freeze. In opposite to that, NGINX runs an ongoing event loop that handles requests as they occur, without allocating resources to the requestors. Nginx also has a strong caching mechanism. It can be used for caching static as well as dynamic files. Cloudflare, a widely used CDN, uses NGINX as its operating system. PHP 7 is said to be twice as fast as previous versions of PHP, and to use considerably less memory. It uses the Abstract Syntax Tree mechanism for compilation which boost performance. It also has an internal opcode caching feature. You can also use the generator(yield) feature to perform co-operative parallel processing. In order to get the best performance. you have to fine-tune your database, code and logic. keeping database connection persistent always helps to increase throughput. Memcache or Redis Always plays important role in caching your results, which will boost your performance. At last, the most important key factor is infrastructure. You will need a high-end CPU in order to achieve the best performance. PHP 7 Performance with NGINX: Web Serving & Caching  
Private charter / motor yacht. Hisense washing machine. Bengaluru wished to expertise trevor noah, however trevor noah skilled bengaluru.