Issue
We have a Telegram bot. It has around 1.2 million subscribers.
Now we're facing a problem in sending messages to these number of subscribers.
Telegram bot API does not provide any batch message functionality and we'd have to send individual requests to Telegram. The problem is, after a few thousand messages, Telegram starts responding with Error 429: too many requests, and does not accept any requests for a while.
How can we effectively message our subscribers?
Solution
You should simply implement a global rate limiter to ensure no single user gets above a fixed number of messages per second. to be safe, set your limiter at lower than 30, maybe even to 5 msgs per second.
Really anything higher than 5 messages per second to a single user quickly becomes an annoyance.
cheers.
Answered By - Charles Okwuagwu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.