Fuzzy schedule

I am writing a Windows service that should perform a task (which connects to a central server) every 30 days + - 5 days (this should be random). The service will run on 2000+ client machines, so randomness is designed to align them so that the server does not overload.

What would be the best way to do this? Currently, I choose a random time between 25 and 35 days from the moment this task is launched and used.

Does anyone have a better way? Is there a better way?

+3
source share
5 answers

, . , , , 25 , , 30 , , .

, "" - ( , ).

+4

, , , , . , , 2000+ .

+3

, ? , " ", . .

+2

, . ( - , !).

0

In addition to long-term alignment, you can return the server-side status code if it is near the bandwidth and ask the client to try again later. At this point, you can simply delay an hour or so, and not after 25-35 days.

0
source

Source: https://habr.com/ru/post/1715533/


All Articles