Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #19

Closed

Conversation

thevolcanomanishere
Copy link

The "do I need this?" section says 1k requests per hour is enough to start using this repo. It should be 1k/second

From the documentation:
Screenshot 2023-10-05 at 20 06 12

The "do I need this?" section says 1k requests per hour is enough to start using this repo. It should be 1k/second
@KnorpelSenf
Copy link
Member

KnorpelSenf commented Oct 5, 2023

You seem to have misunderstood.

< 1000 per hour: built-in polling
> 1000 per hour and < 1000 per second: grammY runner
> 1000 per second: grammY runner with multitasking (bot workers)

Thanks for the initiative to fix up the docs directly, though, we need more people with this level of engagement 🎉

@KnorpelSenf KnorpelSenf closed this Oct 5, 2023
@thevolcanomanishere
Copy link
Author

@KnorpelSenf The included screenshot in my original is not what I was PRing about. I am referring to the README of this repo. Grammy runner is not needed for just 1k reqs per hour.

Screenshot 2023-10-25 at 11 34 53

@KnorpelSenf
Copy link
Member

Grammy runner is not needed for just 1k reqs per hour

1K req/h means roughly one message every 3 seconds. Middleware can sometimes take an entire second to complete, especially if the Bot API server slows down requests due to rate limits. Some bots have a periodic 15-fold load change in the course of each day, depending on the timezones of their user base. This means that bots with an average 1K req/hour can easily receive 3 messages per second. In fact, in some minutes, there can be load spikes with high activity, resulting in 10-20 messages per second.

The built-in polling processes updates in sequence. In total, this means that 1K req/hour can lead to several seconds of wait time for users. It makes a lot of sense to use grammY runner for such bots.

Perhaps one can argue that 2-3K req/h are still acceptable guidelines, but I want to keep the numbers very simple. 1K req/h is the order of magnitude to remember.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants