CDN - - BlobStorage或WebRole用于存储静态文件(图片,CSS,JavaScript的)最佳性能 [英] Best performance for storing static files (images, css, javascript) - CDN - BlobStorage or WebRole

查看:327
本文介绍了CDN - - BlobStorage或WebRole用于存储静态文件(图片,CSS,JavaScript的)最佳性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个CDN非常基本的问题 - BlobStorage和WebRole和perfrormance

I have a very basic question about CDN - BlobStorage and WebRole, and perfrormance.

我有一个非常简单的网站与静态内容,HTML,JS,图片,CSS和放大器;视频(完全打我最大3-5MB的全部内容,如果用户访问的所有网站)。我的网站的流量将是98%,英国和我计划有一个每天最多500.000独特的访客。

I have a very simple web site with static content, HTML, Js, Images, CSS & videos (totally could me max 3-5MB the whole content if the users visit all the site). The traffic of my web site will be 98% from UK and I am planning to have a maximum of 500.000 unique visitors per day.

我的问题是关于性能。

你会推荐我对我webrole使CDN?我会从中受益?有没有使用CDN即使我的流量来了主要来自英国的利益?是CDN内容缓存在互联网服务供应商(如BT)代理?

Would you recommend me enabling CDN on my webrole? Would I benefit from it? is there a benefit using CDN even if my traffic is coming "mainly" from UK? is CDN content cached on Internet providers (eg. BT) proxy?

你会推荐我的托管图像,视频等在Blob存储帐户,并从Web角色绝对URL引用呢?有没有在上一个blob举办一个静态文件之间的性能长期(可能在存储帐户启用CDN?),或者只是把静态文件的Web角色?有什么区别

Would you recommend me hosting images, video etc on a blob storage account and reference it with absolute url from the web role? is there any difference in term of performance between hosting a static file on a blob (may be enabling CDN on the storage account?) or just put the static file on the web role?

我还没有发现多处提到上网,但我猜Web角色中,CDN和存储,使用不同的磁盘/高速缓存层/网络层和它应该表现的影响。

I have not found many references online, but I guess that the web role, the CDN and the Storage, use different disks / cache layers / network layers and it should affect on performances.

推荐答案

我能想到的是,使用CDN的作用,你可能对图像更​​好头的唯一的事(缓存控制,到期),这样浏览器和代理可以缓存很长一段时间的图像,而如果你从你的主网站上投放这些图片你负责控制对这些资源的头文件是

The only thing I can think of is that using a CDN role, you might have better headers on images (Cache-Control, Expires), so that the browser and proxies can cache for a long time those images, while if you serve those images from your main site you're in charge of controlling the headers on those resources.

从不同的域提供图片也将有所帮助,因为所有托管在CDN资源的要求(不同的域名,不使用第三级域)将不包含您需要的主站点的cookie和认证头。

Serving images from a different domain will also help, because all the request to resources hosted on the CDN (different domain name, do not use 3rd level domains) will not contain the cookies and authentication headers you need for the main site.

这篇关于CDN - - BlobStorage或WebRole用于存储静态文件(图片,CSS,JavaScript的)最佳性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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