Should I move my static resources from App Engine to Google Cloud Storage?

We have a web application in App Engine. I was wondering if it's worth migrating my static resources (like images, CSS files and JS files) from App Engine and serving them from Google Cloud Storage.

My thinking here is twofold:

1) We can get the benefits of CDN with Google Cloud Storage. We can even customize metadata for each file to set expiration headers, gzip compression, etc. Also, by serving files from different domains, we can have browsers to download more content in parallel.

2) When downloading some files from App Engine, instance consumption will decrease (fewer requests to App Engine), therefore, costs will decrease.

I'm right? Is this a wise move?

Thanks,

+6
source share
2 answers

None of them make sense.

1) App Engine has a CDN-like feature with cache memory. Unfortunately, this is not well documented. There are several posts about Google I / O. Here begins: http://eng.pulse.me/backend-tips-the-free-cdn/ There is another talk on Google I / O 2012 that you can find. Your static files will be served with the edge cache if there is enough access to them, so there is no need to switch to GCS for this.

2) It is well documented that static files do not accept instances. You have already read this, so paranoia is just paranoia, and that doesn't make sense. It is also very easy to verify by uploading the new version to the application engine, accessing the static file and checking the new instance in Admin.

+5
source

You are right, and the answer you accepted is wrong. The answer to your question from official documents:

https://cloud.google.com/storage/docs/website-configuration

Hosting static resources for a dynamic website

You can use Google Cloud Storage to host static resources for a dynamic website, such as the Google App Engine or Google Compute Engine. Some of the benefits of placing your static assets, such as images or Javascript files in a bucket, include:

  • Google Cloud Storage behaves like a content delivery network (CDN), not working on your part, because public objects are cached by default on the Google Cloud Storage network.
  • The bandwidth fee for accessing content will usually cost less with Google Cloud Storage.
  • The load on your web servers is reduced when serving static content from Google Cloud Storage.
+2
source

Source: https://habr.com/ru/post/954863/


All Articles