Verify and document expectations for time to sync via groupsCacheTTL
Created by: indradhanush
Quoting myself from a Slack thread where an explanation was sought regarding the expectations of how long it would take for permissions syncing via groupsCacheTTL
:
There was some work done for scaling repository permissions a few months ago and based on the planning doc for this effort..... The formula for finding the time to complete permissions sync is:
Best case scenario, where all permissions are distributed via teams / orgs:
hours = (users + teams * repositories / 100 ) / 5000
...assuming 5000 users at the moment, this comes to:
hours = (5000 + 1600 * 50000 / 100) / 5000
This is evaluating to
161 hours
or~6.7 days
. And this is in the best case scenario. The final number is not as heavily impacted based on the number of users. For example, for 100 users the hours evaluates to160.2
. The largest determining factor is by far the total number of orgs / teams. The average case is half of the repos are via teams / orgs while the other half is via collaborator access to the repositories. And the worst case is where all permissions are shared via collaborator access.
We need to verify this formula (AFAIK, it should at least be (users + (orgs + teams) * repositories / 100) / 5000 and add this to our external docs along with reasonable explanations in place for permissions sync using groupsCacheTTL
.