Hey GrowthBook team! Thanks for this amazing produ...
# ask-questions
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).
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
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
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
Iā€™m curious, why does Kotlin SDK need network access?
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.