I posted this in the wrong place so here it is:
Hey team, we currently have GrowthBook set up in one of our services. In order to run an experiment we are calling the following method:
The issue is that at any given time N concurrent calls of that can be made. Each call tries to set the attributes but the problem arises when client X sets attributes, then client Y sets attributes, and immediately after that client X calls
GrowthBook.evalFeature
and the attributes being used are from client Y and not client X. The issue is that this is including some of our subjects in experiments when it shouldn’t be because they would not actually fit the targeting conditions.
One way to fix this is to instantiate a GrowthBook instance per client so that it has its own context, but I know that is not recommended. Do you guys have any good solution for this type of problem? cc: @rhythmic-agency-4145
adorable-cpu-56223
05/01/2024, 3:55 PM
@fresh-football-47124 sorry for the direct ping but we’re trying to get an AB experiment up soon and this caused issues
adorable-cpu-56223
05/01/2024, 3:58 PM
We are using the Java SDK
r
rhythmic-agency-4145
05/01/2024, 4:04 PM
@fresh-football-47124 we’re considering instantiating a new SDK client for each request that goes out, since the attributes are different each time. Is it advisable to do so? we’re looking at potentially 1000s of requests per second