E
E
Evgeny2017-09-21 19:18:43
PHP
Evgeny, 2017-09-21 19:18:43

NodeJS or PHP 7.1 for proxy?

I choose the language for the microservice.
DB - mongodb
The essence of the service: proxying JSON requests, saving the request and adding the id of the saved request to the response.
Algorithm:

  • to accept
  • request from A
  • redirect to B
  • generate UUID
  • get a response from
  • add a UUID to the response and return response A. the connection can be closed
  • save request and response body
  • some other operations

It is important to minimize the time for which A will receive a response and that could process a bunch of requests
. What should I choose php-fpm (php7.1) + nginx or nodejs + nginx in this case?
m.b. other options? like nodejs without nginx?
On synthetics (and here are quite synthetic tasks), it turns out that the node is better?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
RidgeA, 2017-09-21
Lubyanoy @arswarog

IMHO nginx+nodejs

A
Alexander Aksentiev, 2017-09-21
@Sanasol

nginx without everything, for example, you can try.
Just make a uuid generator or google it.

X
xmoonlight, 2017-09-21
@xmoonlight

In order of processing speed:
1. easier and faster - write a microservice in C and run it as a daemon.
2.

like nodejs without nginx? On synthetics (and here are quite synthetic tasks), it turns out that the node is better?
or this option: a clean node without layers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question