energizer91 / smart-request-balancer

Smart request queue with fine tuning of rate and limit of requests
MIT License
97 stars 8 forks source link

Cluster #5

Open touch100 opened 5 years ago

touch100 commented 5 years ago

Would it work in a NodeJs cluster?

energizer91 commented 5 years ago

Hello there! To be honest, I didn't test it with cluster, but i have a project which is working on child_process which is pretty much the same. Yes, it works, but be ready that child processes will not share queue with master process. There is a potential option to store queue somewhere not in memory (in db for example) so queue can be shared between threads, but at current release there is no such functionality, unfortunately.

touch100 commented 5 years ago

Got it. Still a very very cool implementation. I'm going to use it for my messenger chatbot, and when the time comes, I'll see if I can add some Reddis or RabbitMQ queue implementation.

On Tue, 06 Aug 2019, 20:57 energizer91 notifications@github.com wrote:

Hello there! To be honest, I didn't test it with cluster, but i have a project which is working on child_process which is pretty much the same. Yes, it works, but be ready that child processes will not share queue with master process. There is a potential option to store queue somewhere not in memory (in db for example) so queue can be shared between threads, but at current release there is no such functionality, unfortunately.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/energizer91/smart-request-balancer/issues/5?email_source=notifications&email_token=AGDA5IO6QGZNAA5JXQBWUYDQDHCSZA5CNFSM4IJKGMZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3WEAYY#issuecomment-518799459, or mute the thread https://github.com/notifications/unsubscribe-auth/AGDA5IL2PDSEH2TDJEW4BM3QDHCSZANCNFSM4IJKGMZA .

energizer91 commented 5 years ago

Thank you so much! Me myself is using it in Telegram chatbot and it works like a charm