https://www.growthbook.io/ logo
b

bland-farmer-44393

01/16/2023, 2:35 PM
Hi, i'm hosting server on my local infrastructure and i had a doubt. I'm caching api response on redis and i would like to know how a/b test work based on that my data is cached ?
f

fresh-football-47124

01/16/2023, 2:36 PM
Hi Vinicius. The feature flag data includes information about how to assign users in the A/B test
You can use the webhooks to refresh the cache when the feature changes
b

bland-farmer-44393

01/16/2023, 2:37 PM
Great, but who controls ab test ? the sdk ? example: test a: 49% test b: 51% The sdk control this ?
f

fresh-football-47124

01/16/2023, 2:38 PM
yes, the SDK does the variation assignment
specifically, it will hash the experiment name, and the randomization unit you have chosen, into a number from 0 to 1
b

bland-farmer-44393

01/16/2023, 2:38 PM
in this case it doesn't matter if the data is in the api or in the redis. correct ?
f

fresh-football-47124

01/16/2023, 2:39 PM
depends if you’re using any targeting rules
if you are, those attributes need to be available to the SDK
we designed the features payload from the API to be cached
b

bland-farmer-44393

01/16/2023, 2:43 PM
So i have this test. Who will control the frontend result ? The sdk or the server ? In this case 10% will test a and 90% on test b
f

fresh-football-47124

01/16/2023, 2:44 PM
The SDK will hash the users into a number from 0 to 1. If their number is less than 0.1, they’ll get the off case, from 0.1 to 1 they’ll get the on variation.
b

bland-farmer-44393

01/16/2023, 2:45 PM
perfect
f

fresh-football-47124

01/16/2023, 2:47 PM
keep in mind, that running an A/B test in this configuration makes it difficult to adjust weights after it’s started. Doing so will cause users to change variations.
3 Views