Hey Guys, I am trying to get a production setup a...
# ask-questions
c
Hey Guys, I am trying to get a production setup and to avoid massive API load on the growthbook cdn, I am sending requests through varnish to the cdn. I am seeing no issues at all for the /API/ route but the /sub/ route I am getting just time outs from growthbook cdn. For example, this works always https://preprod.adorebeauty.com.au/growthbook/api/features/sdk-uSXqKI4Ir6GYaQZX But this wont - I see occasionally it will respond, but I see response times of > 1 minute https://preprod.adorebeauty.com.au/growthbook/sub/sdk-OFz4Vq1BSYUNI8dP I am essentially just doing a rewrite here and sending the requst through - I have a debug header so you can see the rewritten url x-debug-rewrite: /sub/sdk-OFz4Vq1BSYUNI8dP Right now on the url, I have removed varnish and we are simply sending the request over - is there something which is blocking that I need to update on the request? Once we have a response, my varnish will cache it for as long as we want (when its in the stack) at the moment its just passing through
h
/sub
is a live SSE feed that keeps active SDKs synced with the latest feature & experiment changes. It is similar to a websocket connection so it cannot be cached. If you do not need live changes, you can avoid the API hit by disabling streaming in your SDK. In the latest SDK versions it is off by default.
c
oh awesome @happy-autumn-40938 - thanks for this I appreaciate the help