Hello I'm using :
Node: 8.12.0
yarn: 1.2.1
npm: 6.4.1
electron: 3.0.10
electron-updater: 4.0.4
electron-builder : 20.36.2
My app is 40mb size and then I could have 1000 device that make an update in the same moment.
For solve this problem I have used the Delta update of electron-builder but if I make a big update, it can be 2 or 3mb size and then I'have still the problem of bandwidth.
So I have read that electron-builder offers a Staged rollouts but in docs I'have found a few explanation and I can't figure out how it works
https://www.electron.build/auto-update.html#staged-rollouts
In this doc I can see that I should simply put manually the magic word in my file latest.yml
stagingPercentage: 10
But how it works? What percentage is related to?
Because if I put 50 and I try to donwload from 2 client it doesn't download and in my log I see
Checking for update
[2018-11-26 10:07:06.525] [info] Staging percentage: 0.5, percentage: 0.9731567446079936, user id: bf1a136a-4cc9-5296-bfe4-6a76f920cce7
[2018-11-26 10:07:06.526] [info] Update for version 1.0.10 is not available (latest version: 1.0.11, downgrade is disallowed).
[2018-11-26 10:07:06.525] [info] Staging percentage: 0.5, percentage: 0.9731567446079936, user id: bf1a136a-4cc9-5296-bfe4-6a76f920cce7
If percentage is less than staging percentage, the user updates.
But how does reach a quota for download?
If I put 50% and I connect with 2 client, I expect one download but download doesn't start for neither.
Your sample size is too small. If you roll a dice twice, there's a chance they will both be greater than 3.
Keep in mind that mathematically correct distribution you will get only if you use some special custom update server (use x-user-staging-id as user id).
Current, server-less implementation, is probabilistic. It works quite well if you have a lot of users.
Technical explanation — https://github.com/Squirrel/Squirrel.Windows/blob/f63edb85d29ed6df9a3735690139442c87ebca01/src/Squirrel/ReleaseEntry.cs#L157
It means that for each user some ID is generated and saved. On update, bucket is computed according to this ID. So, if you have only 2 users, there is a chance that both will be in the same bucket :)
Most helpful comment
Technical explanation — https://github.com/Squirrel/Squirrel.Windows/blob/f63edb85d29ed6df9a3735690139442c87ebca01/src/Squirrel/ReleaseEntry.cs#L157
It means that for each user some ID is generated and saved. On update, bucket is computed according to this ID. So, if you have only 2 users, there is a chance that both will be in the same bucket :)