L
L
Leo Developer2017-08-15 10:38:12
JavaScript
Leo Developer, 2017-08-15 10:38:12

Is it possible to run 1000 telegram bots on one server?

Good afternoon!
I have a question.
I need to create a telegram bot constructor in NodeJS.
I want to use vertical scaling, i.e. use for example a server with 32 cores. (Using clustering)
Can I run 1000 bots per thread?
Or is it impossible to do without horizontal scaling?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2017-08-15
@crazy_leo

1000 node processes through the standard https://nodejs.org/dist/latest-v8.x/docs/api/clust... will not take off, it will fall by ~150 forks, one must think. For example, run 10 bots in one process, or here's an interesting article on Habré: https://habrahabr.ru/post/334986/ , and run 32 root processes through it, each of which will have an automatic number of necessary bots.
Also in pm2 there are some clustering tools.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question