Reputation: 623
I have some legacy PHP wrappers that are used to call API's via simple curl requests.
I am creating a Node.JS application to call these wrappers and do some additional asynchronous processing.
However, does linking Node and PHP in this simple manner:
Node<->PHP<->External Server
degrade the speed/ performance of the code?
Upvotes: 1
Views: 40
Reputation: 3270
Some, sure. Any time you add a layer, it impacts performance. However, in such a case, if it's degrading it enough to be noticed by your users, it means your infrastructure is under-resourced even with out that layer.
While there isn't enough information to know what the impact of your implementation is, and how much of your code would be running back through the legacy scripts, keep an eye on your performance metrics and make sure that things aren't getting hammered in any one area.
It could very well be that the PHP scripts themselves (if they're too legacy) would be a bottle neck even if they weren't being served via node.
Upvotes: 1