我应该将静态资源从App Engine移动到Google Cloud Storage吗? [英] Should I move my static resources from App Engine to Google Cloud Storage?

查看:86
本文介绍了我应该将静态资源从App Engine移动到Google Cloud Storage吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在App Engine中有一个Web应用程序。我想知道是否将我的静态资源(即图像,CSS文件和JS文件)从App Engine中移出并从Google云端存储中提供这些资源是个好主意。



我的想法是双重的:

1)我们可以通过Google获得CDN的优势云储存。我们甚至可以为每个文件配置元数据以设置到期头,gzip压缩等。另外,通过提供来自不同域的文件,我们可以让浏览器并行下载更多内容。

> 2)通过从App Engine中卸载一些文件,实例消耗将减少(对App Engine的请求减少),因此成本将下降。



我是对的吗?这是一个明智的举动吗?



谢谢,

解决方案

这些是有道理的。

1)App Engine具有类似于CDN的功能及其边缘缓存。
不幸的是,它没有很好的记录。有几个Google I / O会谈。这是一个开始: http://eng.pulse.me/backend-tips- the-free-cdn /
Google I / O 2012还有另外一个话题,您可以找到它。
如果你的静态文件被访问的足够多,你的静态文件将被提供边缘缓存,所以不需要移动到GCS。


2)很好记录了静态文件不需要实例。你已经阅读过这篇文章,所以你的偏执只是偏执狂,而且没有意义。通过将新版本上传到应用引擎,访问静态文件以及在管理中检查新实例,测试也非常简单。


We have a web application in App Engine. I was wondering whether it is a good idea to move my static resources (i.e Images, CSS files, and JS files) out from App Engine and serve them from Google Cloud Storage.

My thinking here is two-fold:

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

2) By off-loading some of the files from App Engine, the instance consumption is going to decrease (less requests to App Engine), so the costs will go down.

Am I right? Is this a wise move?

Thanks,

解决方案

Neither of these make sense.

1) App Engine has a CDN-like functionality with it's edge cache. Unfortunately, it's not well documented. There's a few Google I/O talks on it. Here's a start: http://eng.pulse.me/backend-tips-the-free-cdn/ There's another talk in Google I/O 2012 that you can find as well. Your static files will be served with the edge cache if they're accessed enough, so no need to move to GCS for this.

2) It's well documented that static files don't take instances. You've already read this, so you 'paranoia' is simply paranoia, and doesn't make sense. It's also very easy to test by uploading a new version onto app engine, accessing a static file, and checking for a new instance in the Admin.

这篇关于我应该将静态资源从App Engine移动到Google Cloud Storage吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆