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

enough-camera-24490

12/07/2023, 6:47 PM
When installing the proxy do I have to manually setup webhooks to have feature changes propagate to the proxy cache?
b

billions-xylophone-11752

12/07/2023, 7:33 PM
Hey Grant - Are you self hosting GrowthBook and using our pre-built proxy? If so, you do not have to manually set up webhooks in order to have the feature changes propagate.
e

enough-camera-24490

12/07/2023, 7:37 PM
The plan is to use the cloud version, and the pre-built proxy. Ideally we would connect our PHP application right to the cache for faster connections. Does the cache attached to the proxy automatically get updated when a change is made on the cloud instance? Or would we need to make an http request to the proxy for that to get updated
I asked another question here about that architecture. https://growthbookusers.slack.com/archives/C01T6Q1SVFV/p1701971093521969
b

billions-xylophone-11752

12/07/2023, 8:31 PM
Awesome - When using the pre-built proxy, the cache is automatically invalidated when a change is made, without you needing to make any manual requests.
e

enough-camera-24490

12/07/2023, 8:40 PM
@billions-xylophone-11752 But it sounds like the actual cache is not updated, so hitting the redis instance directly would not have that new change. Only when you ask the proxy via http would the cache be updated and the new value served.
h

happy-autumn-40938

12/07/2023, 8:46 PM
Chiming in here... 🙂 The GB app will push payload changes directly to your proxy via its webhook (which you configure by setting GB app-level env variables). When this happens, the proxy's cache will be force-updated immediately, including for Redis. Should cache ever go stale for whatever reason (missed webhook etc), we also have automatic paths built into the proxy for pull-based cache updating using SWR.
e

enough-camera-24490

12/07/2023, 8:47 PM
@happy-autumn-40938 Do you know if those can be set when using the cloud service?
h

happy-autumn-40938

12/07/2023, 8:50 PM
Yes, for cloud customers, we let you define a self-hosted GB Proxy endpoint. You would set this per SDK Connection rather than globally (it's one of the fields in the Edit Connection form). Then you'd point your GB SDKs to your proxy instead of our CDN (or in the case of React, you could put your own CDN on top of the proxy).
e

enough-camera-24490

12/07/2023, 8:52 PM
Ah cool. That is making some sense now. Wondering if it would be bad practice to connect React to the cloud CDN and PHP to the proxy cache.
I really appreciate it!
h

happy-autumn-40938

12/07/2023, 8:52 PM
yes, that's what we typically see. You'd only want to wrap with your own CDN if you have very specific uptime requirements
to clarify: it's common with React/JS SDKs to connect to (1) our Cloud CDN for feature fetching, but (2) connect to your proxy for the streaming/SSE. So basically a hybrid approach
e

enough-camera-24490

12/07/2023, 9:01 PM
It seems like the cloud cdn now is offering streaming
But for SSE the proxy is required.
h

happy-autumn-40938

12/07/2023, 9:02 PM
streaming === SSE. you are correct, we offer it for cloud connections and you can safely rely on it if you prefer
3 Views