Hey GrowthBook team! Thanks for this amazing product š
Question: For self-hosting, what happens if the MongoDB container or the GrowthBook API goes down (chaos engineering)? The MongoDB container will disappear, since all containers are ephemeral.
Context: We are currently testing out self-hosting of GrowthBook through K8s on GCP. The plan is to run GrowthBook and MongoDB in separate containers (without MongoDB Atlas).
f
fresh-football-47124
05/04/2022, 8:39 AM
Hi Bardur, thanks
fresh-football-47124
05/04/2022, 8:40 AM
well, it will start to throw errors with the API connections
fresh-football-47124
05/04/2022, 8:40 AM
but we encourage caching of the features json so there are no hard dependancies
š 1
c
creamy-doctor-6871
05/04/2022, 9:19 AM
thank you for the quick answer š I have a follow-up question: What will the SDK deliver in case the MongoDB crashes? Will it throw errors as well?
š 1
f
future-teacher-7046
05/04/2022, 11:56 AM
For Mongo, it's recommended to run a 3-member replica set in production and use persistent volumes for storage.
future-teacher-7046
05/04/2022, 11:58 AM
As for the SDKs, with the exception of Kotlin, none of the SDKs make any network requests. You pass in a JSON object with feature definitions. If you fetch that JSON directly from the GrowthBook API endpoint, then it will fail if mongo or the API is down. We recommend adding a caching layer so that even with GrowthBook down, you can still fetch the latest features JSON from the cache
š 2
p
prehistoric-waitress-6977
05/09/2022, 4:06 PM
Iām curious, why does Kotlin SDK need network access?
f
future-teacher-7046
05/09/2022, 4:07 PM
It handles fetching and caching feature configs. The swift SDK also does this, but it's not required. You can just pass in JSON directly.