I have a PHP application running on my own server (not localhost but a real server accessible via internet), and I want to add Node.js server to it. I came across this article saying about Reverse Proxy. At the end of the article, it mentions that this particular approach has performance cost and therefore only suitable for specific cases.
It’s worth to note that this approach is suitable for a specific role with limited number of users. But if you want to have the performance scalablity, you’ll need to to run both apache and node.js separately and use something like nginx to do the reverse proxy instead.
Now I'm wondering how and why that is and if I should move away from this approach because I have a lot of users using my service. If anyone has better suggestion than this approach, please enlighten me! Thank you in advance.
I use such an approach myself and as far as you don't need a low latency I don't see the necessity of this.
The best solution for getting around the Proxy would be using a different port.
Due to Apache managing the domain resolving.
It might also be worth noting that apache does compression and SSL which is something you would have to worry about your NPM running on a possibly different port than 443.