Answer the question
In order to leave comments, you need to log in
Will the VK API frequency limit work in such an implementation of requests?
VK api has a frequency limit, 20 requests per second.
There is an execute method with which you can combine several api calls into one. Up to 25 calls.
Let's say I have a game VK bot that needs to send responses to users quite often. Suppose there are 500 people online in the game (I don’t know if this is a lot or not), and every 2 seconds, he writes something to the bot. And in order for users to receive responses without delay, the server must send 250 messages per second.
Server: (NodeJs)
There is a certain database, let's say redis, we shove each user request there (we make a queue), if the user is unique, that is, he has not written anything yet and is not waiting for a response.
In another part of the server, there is an interval of 0.05 seconds.
He gets 25 people from the database, combines everything into one execute and sends it to VK. In total, 500 messages per second are obtained.
Question: is there any chance to catch blocking api method for a token? And how to avoid it?
On the one hand, I do not violate the frequency restrictions, on the other hand, there are suspicions that everything will not work according to plan.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question