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

adamant-exabyte-53836

05/04/2022, 8:22 AM
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
well, it will start to throw errors with the API connections
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.
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.