Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LAMP and nodejs on the same server

I am having a PHP(Laravel Framework) application and a nodejs application. The nodejs application is used for sending push notification to user browser in conjunction with socket.io .Since PHP is not a better solution for long polling process I had to include node.js application in to my stack. I am using nodejs only for a single functionality (to show some real time data to a user who comes to my page ).

I can expect a concurrent connection of 1000 , so I avoided using PHP for ajax long polling and used nodejs for handling long polling along with socket.io

Now I am confused whether deploying my PHP application and nodejs application will cause any issues? My PHP application will be communicating with nodejs app through internal APIs.

Is it fine to deploy nodejs on a LAMP stack in terms of performance? Does the traffic hits (long polling) process on nodejs affects my server and there by affects my PHP application?

like image 571
Ajeesh Avatar asked Jun 30 '26 23:06

Ajeesh


1 Answers

No Problem having them on same server. Just make sure the nodejs server isn't trying to bind on the same ports as the apache (i.e.. not 80/443)

like image 156
oori Avatar answered Jul 02 '26 13:07

oori