Hi team :wave: I am looking for some clarification...
# ask-questions
p
Hi team šŸ‘‹ I am looking for some clarification on how GrowthBook CDN requests and bandwidth are counted please. We have asynchronous updates enabled with the GrowthBook SDKs so flag updates are pushed to clients browsers etc. quickly - are these asynchronous events included in the monthly CDN requests/bandwidth counts? Thanks!
f
Hi Craig šŸ‘‹ The following are counted towards your CDN requests: • Feature flag payloads. • Each time a client-side (front-end) SDK hits the GrowthBook CDN. If you're doing client-side testing, the number of API requests will be roughly related to how many sessions you have. • Each time you make a call to GrowthBook's REST API. Given the above, yes – opening or reconnecting the real-time (SSE) connection to the GrowthBook CDN does count as a CDN request, and the data sent over that connection contributes to CDN bandwidth usage. The individual update messages sent over an already-open SSE connection do not create additional HTTP requests beyond that initial/open request.
p
Hi @flaky-noon-11399, thanks for the response - just one more clarification then - only the initial connection or reconnections will be included in the CDN requests count - not the periodic (30 second) "heartbeat" the server sends to keep the connection alive?
f
Hi @plain-beard-37965, good morning. Only the initial SSE connection and any reconnections would count as CDN requests. The 30-second heartbeat messages are sent over the already-open connection, so they would not count as separate CDN requests, though the small amount of data sent over that connection would still contribute to bandwidth usage.
Opening the stream is an HTTP request and messages delivered over that already-open stream are not separate HTTP requests. However, if the stream disconnects and reconnects, each reconnect is a new request.