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

rhythmic-chef-84815

06/13/2022, 2:43 PM
Quick question, lets say I am running an growthbook instance in the server, and I go and change the traffic split for the test. How would this instance know that the traffic split changed? Does the library gets updated automatically for this cases?
f

future-teacher-7046

06/13/2022, 2:44 PM
When you publish changes to a feature, the /api/features/ endpoint gets updated with the latest configuration and we send out a webhook (if you have one enabled). How your application gets updated depends on how you integrated (caching layers, etc.)
r

rhythmic-chef-84815

06/13/2022, 2:45 PM
so we need to set this up then I see
f

future-teacher-7046

06/13/2022, 2:46 PM
People tend to either poll the /api/features endpoint periodically and update a cache OR they add a webhook to update a cache. Then, have the SDKs read from the cache
r

rhythmic-chef-84815

06/13/2022, 2:50 PM
So I found in the website the webhooks, now I just need to provide an endpoint there in order to update in the server. But now I need to figure out the frontend part also
f

future-teacher-7046

06/13/2022, 2:51 PM
There are docs here if you haven't seen these yet - https://docs.growthbook.io/app/webhooks
r

rhythmic-chef-84815

06/13/2022, 3:21 PM
after finding in the website it was pretty obvious 🙂 Thanks for the help again Jeremy, I already created an endpoint here for the webhook
4 Views