V
V
Voprosium2021-11-23 07:39:41
Telegram
Voprosium, 2021-11-23 07:39:41

What loads can the bot on aiogram withstand?

I am writing a bot on aiogram, it is understood that many people can come to it at once, no matter how the bot falls at that moment.
The only thing I did to protect it is:

  • Made a delay in sending messages

Also, I think that you need to take a good server, with a good Internet.
Please advise good servers for telegram bots.
If there are other ways, then I will be glad to listen to them, I think many people ask these questions.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
antares4045, 2021-11-23
@Voprosium

As for the question from the title: it depends on the functionality that you put on the bot. Python, roughly speaking, is single-threaded, and due to the peculiarities of the api, the telegram will not scale by adding instances (or rather, it will be supergemoral). But if you do not have quadratic logic in your code, you should keep a thousand users on a coffee maker; If there is ... it’s not a fact that the bot will cope with one user stably: without the code (or at least the general idea of ​​​​the bot), it’s impossible to specifically answer your question.
As for protection against falls: the bot should not fall from too much load (if it falls, then there is a jamb somewhere), it should just respond to requests more and more slowly. There are ways to manage the load, which are used by big uncles, like Google (but if you have such loads, when it makes sense to do load balancers, I will be sooooo surprised). However, large code is doomed to fail from time to time, because programmers (including Guido) mess things up: they just need a system that will make sure that the fallen instance gets up again (and it’s not bad that it resumes work from that place on which he died and not from scratch)
As for the server, it is not entirely clear: if you want to buy something, then now is not the best time (semiconductor crisis, upcoming winter holidays, etc.). If you rent, then everything is difficult: today some are good, and tomorrow they have a different admin, but as a rule, the top of the search results for the query "VPS rental" is, plus or minus, adequate (I advise you to pay attention to regra and digital motion).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question