Answer the question
In order to leave comments, you need to log in
How to send requests to php-fpm directly from nodejs?
Architecturally, the application looks like this - the front server on nodejs and the api server on php (php-fpm) are on the same physical server. Requests to them are proxied by nginx. A frontserver is an isomorphic javascript application that performs the main logic and renders html code, but receives the necessary data from the api server. Now it happens like this - for example, a request came in - nginx passed it to the node, which, in turn, performs network requests to the api server, receives data, performs some data processing, renders the page and sends a response. The question is how to bypass network http requests and directly send them from nodejs to php-fpm (php-fpm listens to unix socket)
Answer the question
In order to leave comments, you need to log in
Send requests directly to the unix socket.
As an example https://habr.com/ru/post/472190/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question