mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 23:15:49 +03:00
[GH-ISSUE #557] Bypass telegram rate limit using message grouping/queueing #403
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#403
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ypapouin on GitHub (Aug 26, 2021).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/557
Apparently, there is 30 msg/sec limit for a telegram bot.
When services depends on each others you can quickly reach this limit and have an inconsistent feedback state in your messaging app.
Since the minimal check unit is the minute, my proposal is to group check states changes in one message per project that would be sent every 60s if any. It implies to keep a queue of any state changes.
The other way is to also keep a global telegram queue and slowly dequeue it with a rate of one message every 2 seconds.
@cuu508 commented on GitHub (Aug 27, 2021):
Can you share some details about your use case? When you are receiving 30+ Telegram messages per second, how are you going to notice a missing one?
There is also rate limiting for Telegram notifications on Healthchecks side – 6 messages per chat per minute.
One problem I see with this is Telegram notifications could get delayed up to a minute (when they need to be sent just after "the bus has left"). Another one is the additional complexity of maintaining a queue.
@cuu508 commented on GitHub (Dec 8, 2021):
I think the 6 messages per chat per minute rate limit is reasonable.
However, when, let's say 100 checks go down all at the same time, there is a risk the user will receive 6 notifications, and will not realize there are 94 more failures – the problem is bigger. To help with that, I updated the Telegram notification template to also list other checks currently down: