I'm running n split tests on a website. I want to assign an evenly distributed integer user id to one of the n buckets, and deterministically so the same user always gets the same test.
At this point, I can just pick an index in the list of split tests by modding the user id by n. What if I want to weight certain tests?
For example, bucket #1/21 is assigned 90% of the time and the remaining 20 tests are assigned 0.5% of the time.
I feel like I can somehow scale up the size of my list and still use the mod technique to accomplish this, but having potentially huge, temporary lists in memory seems inelegant.