Hi. I've learned that Growthbook could detect an ...
# announcements
r
Hi. I've learned that Growthbook could detect an already-used attribute ID so an experiment result will be the same for a particular user. I'm using growthbook in Golang backend and it works well in my local. My current implementation: • Keep a pointer of FeatureMap that will be updated by: ◦ A go routine, regularly fetched the latest feature values ◦ A webhook, register the webhook to Growthbook • On each HTTP request, initiate new growthbook context with attribute ID attached (userID). So, new growthbook instance for each request, using the same feature map. My question: • Where did this attribute ID being cached? How did the growthbook instance know that this or that ID is already assigned with an experiment variation? • If I spawn up 5 replicas of backend service, will the growthbook cached this attribute ID independently in each service? ◦ If so, will this lead to the same user receiving different growthbook experiment result in different service? Thank you in advance!
f
Hi Herpiko - (if I understand your question correctly) - GrowthBook does not cache any results of an assignment - instead, as you have figured out, we use deterministic hashing to make sure that if the user id (or whatever hashing attribute you’re using) is the same, the user will get the same variation. This means that if you spawn 5 replicas of a backend, the user will get the same variation for all/any of them.
r
@fresh-football-47124 Thank you for your response! It seems that you understand my question. All of this deterministic hashing are happen locally without the Growthbook server, right? The main purpose of the Growthbook dashboard is to "configure" and provide the values/experiment config via API. The distributing works themselves are being handled by the client locally. Please correct me if I am wrong.
f
correct, it’s done locally
you can cache the json payload, or use inline experiments/features so there are no 3rd party calls required
r
@careful-table-10580 Thank you!