Broadcast speed
Terms
- Bot API
- The interface your bot uses to talk to Telegram's servers via HTTP requests
- Flood
- A Telegram error when there are too many requests to the Bot API or they come too often. You have to wait before the next requests, and the speed drops. It's especially noticeable in large active bots. It can't be bypassed
- Flood wait
- The time you have to wait after a flood before sending new requests
- DC
- The data center – roughly, «where your bot lives». It affects how fast requests are processed and how many floods occur
- Speed
- How many requests to the Bot API are sent per second
- Average speed
- During a broadcast the speed goes up and down – mostly because of floods
- Request time
- How long it takes to connect and send a request to the Bot API. When Telegram works normally, it's under a second. A growing request time means problems on Telegram's side or in a particular data center – so it may differ between bots. It also happens when Telegram ignores the bot's requests because of floods
What affects the speed
Broadcast speed isn't simple: you can't set a high value and expect the broadcast to run at it for sure. BotManager adjusts the speed itself – both down and up.
The speed depends on the data center, the time of day, variables in the post, sending to selected languages or by Telegram Premium, and the size of the base.
- The more parameters you choose, the lower the final speed: language, Premium, name, username etc. need extra requests to Telegram.
- Albums are sent slower than regular posts: a post with one photo is one request, while an album is as many requests as it has media.
- Your bot also spends requests when it replies to users.
More requests – higher flood riskIf a large base hasn't finished sending and you start a new broadcast, expect floods. When there's a flood, all you can do is wait out the flood wait Telegram returned. If you ignore it, the bot may get an even longer flood wait and the broadcast will drag on. Floods can also disrupt the bot's normal work – it will reply to users worse.
Speed settings
- Floating
- The speed adjusts itself to your bot's limits – up and down. Recommended
- Fixed
- The speed always stays the same, limits are ignored
- Recommended flood wait
- On a flood, the recommended pause is respected. If turned off, the pause is minimal
For all bots we recommend these defaults:
- speed no higher than 60 per second;
- floating speed;
- recommended flood wait: yes.
Then fine-tune the speed for your bot based on its activity. Watch the floods: if there are more than 10 per broadcast, consider lowering the speed.
Was this article helpful?
Didn't find the answer? Contact support