3 ms·
Prime Numbers for the Win (2009)
- wruza 6y agoAnother way of spreading the load is to sleep(random(sensible_delay)) before executing a scheduled task.
- mark-r 6y agoWith random numbers there's still a non-zero chance of everything happening at the same time. Prime numbers make things more predictable and consistent.
- odomojuli 6y agoSolving a bug using a cicada heuristic. Clever! For anyone unfamiliar, cicadas spawn in years of 17 or 19 to avoid overlap with predator cycles which tend to occur in years of 2 or 3.
- MatthiasWandel 6y agoThis problem would be better and more consistently solved by just offsetting some of the scripts in time. Who says the 10 second script needs to run on even seconds or even multiples of 5?