Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Storage vs Google Cloud CDN

I have several video content that I share through my Google Cloud Storage through my Django Google App Engine Application with signed url mechanism associated with an expiration time.

def get_signed_url(self, entity):
    blob = bucket.get_blob(entity.url)
    logging.info(entity.url)
    expiration_time = timezone.now() + timedelta(minutes=120)
    signed_url = blob.generate_signed_url(expiration_time)
    logging.info(signed_url)

    return signed_url

Although it has been explained in [here][1] possible usage relationship of GCS and Google Cloud CDN, would this be applicable to stream video content (MP4 or MPEG-DASH with MP4) through Google Cloud Storage as it is mentioned to have an implicit CDN itself.

If using Google CDN is a wiser way to broadcast online video content, what would be the best strategy to achieve this, how can I use the Google Cloud CDN on top of my current implementation with Google Cloud Storage ?

like image 627
london_utku Avatar asked Mar 09 '26 20:03

london_utku


1 Answers

Although Google Cloud Storage leverage "parts" of the CDN infrastructure, it is only a convenience layer, with no control over cache keys, invalidation and requires either a public bucket (at odds with signed URLs), or per-object Cache-Control metadata to be set.

Egressing large volumes of data (e.g. HLS/DASH video) from a bucket is also a fair bit more expensive - for North America, it ranges from $0.12 - $0.08 based on volume. Cloud CDN ranges from $0.08 - $0.02 (after a petabyte) for North America egress.

You should also take a look at the Signed URLs and Signed Cookies support in Cloud CDN, which allows you protect your video segments from unauthorized access on a per-user basis - similar to GCS signed URLs.

TL;DR: GCS & its caching mode are a nice convenience and good for small traffic volumes, but if you plan to even serve a few hundred GB (let alone more), setting up a HTTPS Load Balancer + Cloud CDN in front of a bucket will give you a lot more flexibility and reduced costs.

(I am the PM for Cloud CDN, if it helps!)

like image 54
elithrar Avatar answered Mar 11 '26 10:03

elithrar