K
K
kostya_mamanjvitch2019-07-16 21:52:37
Bots
kostya_mamanjvitch, 2019-07-16 21:52:37

How to distribute the work of the bot so that there is the least load on the server?

I am writing a bot for instagram, for mass viewing of stories. Wrote, works. But only with 1 user. There are plans to make a free service for this function. But how to distribute users? How to make the minimum load on the server?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
C
chachaUnholy, 2019-07-17
@chachaUnholy

Definitely HTTP(S) requests must be asynchronous. Of course, if insta your service does not send you to rest for frequent requests. How many requests per second allows you to make insta from one ip address / login, did you find out? Similarly for the bot interface, i.e. its platforms: vk, ok, fb, viber, etc.
The database will definitely be, and it must be backed up. Naturally, during the hours of the least load. Under the database now you need an SSD and / or a decent amount of RAM.
Rumor has it that premature optimizations are not always justified.
In total, it all depends on the architecture of your solution, which is not known.
I see this order, albeit a captain's one:
1) monitoring. How to monitor load for your PL/framework? Find out how much which function in the code is executed in time, at least. Having mastered monitoring, you can do tests
2) load testing. 1, 5, 20, 100 users. Maximum requests for everyone. What resources sank - those and pull up by upgrading the hardware or code. Well, to catch errors.
Good luck.

N
neatek, 2017-10-19
@neatek

The answer is simple, name an incomprehensible English name that does not translate, and it will be exactly what you wrote.

V
Vladimir, 2017-10-19
@djQuery

Why do you want your project to look like something? Perhaps you have a unique offer - or can you name similar sites?

M
Maxim Fedorov, 2017-10-20
@Maksclub

Like LiveStreet? Blog-social network?

A
asantat, 2017-10-21
@asantat

storytelling, experience sharing, live education, on-story-education, live book, live encyclopedia, repository of collective experience.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question