'Google Cloud Storage to serve website images

We will launching a Google Campaign for our Website and expecting high number of users visiting our website.

Hence, I did some pre-calculations and figured out that serving images from Cloud servers would be best approach, which are currently being served from dedicated server.

I haven't got any clue on how Google Cloud Storage works or any other service. So can someone please guide me to relevant steps that I should be taking for hosting all our images to Google Cloud Storage and how can I serve them from Europe, and mapping of subdomain.

Currently I am following this Guide

Edit: Before going for Cloud I compared the purpose of CDN vs Cloud and this what I figured out.

CDN: Used for serving contents from multiple regions: Speed is the purpose

Cloud: Used for serving contents for high bandwidth usage: High Availability is the purpose

And my Main purpose is High Availability, I hope I have gained correct information from dear friend Google.



Solution 1:[1]

Are you looking for this: https://developers.google.com/storage/docs/bucketnaming

You need verifying your domain name so it can use a CNAME in Google Cloud Storage https://groups.google.com/forum/#!topic/gs-discussion/V-nLULNRQLI

After second thought, are you sure you need Google Cloud Storage?

It sounds like you just need a CDN or Amazon S3 stuff.

If memory serves, you need to do the following to use Google Cloud Storage with a custom domain:

  • verify your own domain names, such as example.com
  • upload images to Google Cloud Storage, you can use tools such as gsutil etc
  • serve these images with your own subdomain names such as images.example.com etc

Solution 2:[2]

You can serve images from google cloud storage. The nice benefit is: Google will do the serving for you and when you use the images api to create serving_url's you can crop and size the images while serving.

Look at this gist for details.

If you like to use you own domain as part of the image url, you cannot use https!

Solution 3:[3]

Serving Static Files

Applications often need to serve static files such as JavaScript, images, and CSS in addition to handling dynamic requests. Apps in the flexible environment can serve static files from a Google Cloud option like Cloud Storage.

https://cloud.google.com/appengine/docs/flexible/nodejs/serving-static-files

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 voscausa
Solution 3 Felipe Roschel