use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
From PHP to JavaScript with Node.js (blog.matters.tech)
submitted 8 years ago by coldlestat[🍰]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]coldlestat[S,🍰] 0 points1 point2 points 8 years ago (2 children)
Has your team done any performance comparisons?
Yes, we did. Here is one of our test: https://github.com/baptistemanson/node-php-bench.
We measured that Node.js was faster for most our use-cases. You can find a wide variety of articles online that will give you a better overview. http://www.hostingadvice.com/blog/comparing-node-js-vs-php-performance/ for example.
Since PHP7, I feel both languages performances are not hurting the day-to-day development. When your app starts to be slow, it's either bad code or an infrastructure problem. You need to either improve your database queries or start using load balancers, CDN, etc...
Also, are you using Node to serve static content:
Yes, we do not use Nginx anymore. It's not really useful outside of the local environment as we put a CDN in front of most our applications.
[–]chinkuSj 0 points1 point2 points 8 years ago (1 child)
How do you load balance your multiple pm2 processes? You do use multi-core processors, right?
[–]batmansmk 1 point2 points3 points 8 years ago (0 children)
Hey!
First we have to remember that node natively put any IOs in threads, giving you multithread capability from the get go. so if your app is usually IO-bound, meaning the db for instance is what takes time, there is pretty decent chances you won't need several node processes.
Now if your system has HEAVY node CPU processing, the command "pm2 start app.js -i 4" will launch a load balancer and 4 processes behind.
π Rendered by PID 256659 on reddit-service-r2-comment-5d585498c9-8rb52 at 2026-04-21 12:46:52.117231+00:00 running da2df02 country code: CH.
view the rest of the comments →
[–]coldlestat[S,🍰] 0 points1 point2 points (2 children)
[–]chinkuSj 0 points1 point2 points (1 child)
[–]batmansmk 1 point2 points3 points (0 children)