What technologies are more performant for web development than Nginx and PHP?
I would like to know if there is any way to make dynamic websites that perform better than NGINX and PHP, I accept any programming language, even C++
I have tried CGI and C++ but it is extremely slow compared to Apache and PHP. I understand that Node and Python are also slower than PHP.
7 comments
[ 2.8 ms ] story [ 23.9 ms ] threadIf you are looking for performance from the developer, php or ruby on rails is what I'd suggest.
Every webapp I've worked on professionally in the last 15 year had the back end written in either a JVM or .NET language, occasionally with some C++ or Tensorflow to implement neural networks. Usually the language has been Java, less frequently it has been Scala (yuck!) or C#.
The performance of that kind of system is very good because both JVM and .NET have solid support for threads and shared memory. If your application has 100 MB of configuration, ML models and other 'constants' you can load it once and access it later at zero cost.
Concurrency is well-supported in the sense of "300 people are making 500 http requests simultaneously" and also "we can simultaneously query 10 databases with 10 threads" and "we can break up a task that takes 500ms on the CPU into multiple tasks that really run on multiple cores."
Your mistake was to use CGI instead of FastFGI or using a reverse http proxy. CGI spawns a process per HTTP request, which is very slow whatever the programming language is.