DEV Community

bill cool
bill cool

Posted on

Telegram Bot Getting Blocked Under High Load – Solutions?

I’m developing a group management bot that mainly handles automatic replies to keywords and deletes prohibited messages. However, when there’s a large volume of messages, the bot's performance slows down. For example, after sending 6 messages consecutively, the bot gets stuck when trying to send the 7th message, often entering a blocking state. We have checked the code, and even set up our own Telegram Bot API server, but the issue persists.

I’m curious about how high-traffic bots, used by groups with tens of thousands or even millions of members, manage to maintain fast response times. What kind of optimizations or techniques do these bots use to handle large-scale usage without getting delayed or blocked? I’d appreciate any advice or suggestions on how to improve performance under heavy load.

Top comments (0)