What is the equivalent for AWS Cloudfront service in Google Cloud?

12,716

Google Cloud features built-in edge caching in its points of presence for services like Cloud Storage and App Engine, so in many cases you may not need a separate CDN product. I would suggest measuring your use case with and without a CDN from a few countries before adding in the extra expense. Keep in mind that objects need to be publicly readable with cache control settings that allow caching (which is the default for public objects) in order for Google's edge caches to cache them.

Google Cloud does have a CDN service, though, called Google Cloud CDN. It ties in with Cloud Load Balancing. It offers direct support for GCS buckets, although that's still in alpha. The upside is that serving GCS resources via Cloud CDN adds some nice perks, such as the ability to use custom domains with HTTPS or mapping GCS bucket names to differently-named domains.

In addition, if you're happy with CloudFront, I believe that you can use GCS (or pretty much anything else) as an origin server for it.

Share:
12,716

Related videos on Youtube

Misha Zaslavsky
Author by

Misha Zaslavsky

Hello, I am Misha Zaslavsky from Israel. I am currently working at Graduway as a Director of Software Engineering.

Updated on June 25, 2022

Comments

  • Misha Zaslavsky
    Misha Zaslavsky almost 2 years

    Today, I am using AWS S3 bucket and on top of it I am using AWS CloudFront.

    I want to have also a Google Cloud storage with CloudFront, so I found the Storage where I can create bucket and put their my static files/images which is equivalent to the S3 bucket. But what about CloudFront? Where do I set CloudFront in Google Cloud?

    Thanks in advance.

  • Michael - sqlbot
    Michael - sqlbot over 7 years
    "In addition, if you're happy with CloudFront, I believe that you can use GCS (or pretty much anything else) as an origin server for it." That's correct. (I'm doing it.) Anything accessible over the Internet using HTTP(S) can be a CloudFront origin server.
  • Misha Zaslavsky
    Misha Zaslavsky over 7 years
    @Michael-sqlbot And is there any traffic that goes from Google storage bucket to the CloudFront of AWS? Because it seems to me that if to use AWS Cloudfront so it will be faster to use their S3 storage as well, then Google's (I mean that I don't know how the traffic between Google and AWS, it could be slower).
  • Michael - sqlbot
    Michael - sqlbot over 7 years
    @MishaZaslavsky the answer to that is slightly more complex than it might at first appear because the geographic distances between viewer and edge, and between edge and origin are factors, but generally, yes, the optimal performance for CloudFront would typically be expected with S3. The overriding point is that alternatives are possible. Also, using GCS you would be billed by Google for egress bytes from GCS to CloudFront, while S3 waives its outbound transfer charges when used behind CloudFront.
  • Michael - sqlbot
    Michael - sqlbot over 7 years
    Note also my comment above, when I said "I'm doing it," I didn't mean GCS specifically (although that is one of my DR strategies, I have buckets mirrored from S3 to GCS as protection against a catastrophic outage in S3). I am, however, running servers in non-AWS data centers behind CloudFront (configured as CloudFront origin servers... one old platform runs on Solaris, so, no EC2). I also have a web server in my living room on a cable modem connection that is behind CloudFront. Works great. :)