https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
h

handsome-lifeguard-47545

05/25/2023, 7:47 PM
Does growth book require a separate instance of the SDK for each user? IE: If I have a node.js server, and I have 10 users, I have 10 instances of the growthbook SDK initialized in my app, each bound to a particular user via attributes?
f

fresh-football-47124

05/25/2023, 9:28 PM
Yes, I believe so. Each instance is very light weight so shouldn’t cause any resource problems
👍 1
h

happy-autumn-40938

05/26/2023, 6:01 PM
To elaborate on this a bit, SDK instance per connection is done by design. There is a central in-memory "feature repository" (basically a singleton created by the SDK) which all SDK instances plug into and subscribe to, so memory usage stays light
👍 1
h

handsome-lifeguard-47545

05/28/2023, 7:37 PM
Gotcha! Thanks for the details! We were wondering if we’d have to build our own middleware or something to handle that functionality at that point! Thank you!
11 Views