T
T
tikhonov_alexander2017-09-29 09:00:21
Node.js
tikhonov_alexander, 2017-09-29 09:00:21

How to organize interprocessor communication on nodejs?

Hello. I am just getting acquainted with Nodejs before writing in php. There are N number of workers who are running the queue from rabbitmq. The task of calling via api and the token itself come in the queue. There are 4 tokens for all workers and there is a limit of 2 requests per second for each token. How can this be organized? On php I did it with the help of semaphores and Shared Memory (shm_attach). Everything works fine, only you need to keep arrays of 5 values, and in php it eats up quite a lot more RAM than on a node.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RidgeA, 2017-09-29
@RidgeA

I would look towards Redis/memcached

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question