samedi 9 février 2019

Best possible way to generate a random number from lot of devices at the same time

Assume a use case where there is huge volume of requests ~10K tps to particular API/Service from MobileApp at a specific time (say once in a day exactly at 6 AM). Instead of all the apps starting to make a request at the same time, i am thinking of generating the random number say x between 1 to 60 and delay the service request by x seconds. My understanding is that the requests traffic is distributed for 60 seconds, it will reduce the traffic from 10000 TPS to ~200 (10000/60) TPS. Now the random should which is getting generated from lot of customer devices should be fairly random not skewed. Any best practices to generate random number?




Aucun commentaire:

Enregistrer un commentaire