W
W
wi1ex2017-06-01 00:47:01
Python
wi1ex, 2017-06-01 00:47:01

What power is needed for a server for a VK community bot?

What power will vps be needed (and will one be enough) for an asynchronous python bot that will respond on behalf of the VKontakte community if 100, 1000, 10,000 people write to it at the same time?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Serezha, 2017-06-01
@wi1ex

Um ... Well, like ... If people write ping, and the bot responds without any checks pong, then 256mb 1x1GHz is enough ...
Here you see what the problem is, you didn’t indicate whether you need a database (and you need it), don’t indicated what the bot will do in general (maybe you want to process user photos with the heaviest filters on your VDS and send them back).
Here you don’t need to think about VPS, but about the fact that, according to all the laws of api contact, you will process 10,000 requests for 133 seconds and no less (formula x / 25/3, where x = number of requests). Well, while we are processing 10 thousand requests, another 133x10000 requests come to us, hmm ...
In fact, such peaks are raked quite successfully, I followed such jumps during active advertising (in the top public).
VDS 2gb 2x2.4ghz, nginx, php, node, mongodb installed. Bot on the node, auxiliary scripts on php. Enough for a bot (and another one of the same kind) that receives ~ 2 million messages per day, ~ 20k comments in addition, all unsubscribe subscriptions (in total ~ 4-6k), while each request to the bot generates 1-10 database requests and requests to third-party api.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question