19

我正在使用 azure blob 存储将图像存储在公共容器中并将它们嵌入到公共网站中。一切正常,blob 在xxxxx.blob.core.windows.net我上传它们的那一刻就可以公开使用。我想将 Azure CDN 用于他们的边缘缓存基础架构,并在xxxxx.vo.msecnd.net.

但是现在,当我将图像指向 CDN 时,它会在 15 分钟左右返回 404,然后它开始提供服务。在他们的文档中提到,我们不应该将 CDN 用于高违规或频繁更改的 blob,但是具有公共站点图像上传功能的简单 CMS 保证 CDN 不是吗?

4

4 回答 4

14

对于上传到我的电子商务网站的产品图片,我目前的情况完全相同。出于所有显而易见的原因,我更喜欢在 Azure blob 存储之上使用 Azure CDN,但不能等待 15 分钟才能获得映像。

现在我已经决定最初存储 blob 存储 URL,但后来通过每天运行一次的 Azure WebJob 重写它以使用 CDN 域。这似乎是不必要的额外工作,但我还没有找到更好的选择,我真的很想使用 Azure CDN。

于 2014-09-18T10:30:39.977 回答
0

我现在正在做什么......对于我在部署之前手动上传的网站相关图像和文件(https://abc.blob.core.windows.net/cdn)以及如果网站用户使用我的网站上传图像或文件,在内部我使用CloudBlobClient将该文件上传到 blob 存储(单独的容器不是 CDN)

于 2017-10-06T05:03:51.280 回答
-1

CDN 用于静态内容交付,但在您的情况下,您需要通过 CDN 进行动态内容交付。您可以使用云服务 + CDN。这使得使用 ASP.net 缓存概念从 CDN 交付的动态内容。

有关详细信息,请参阅此链接:使用 Windows Azure 内容交付网络 (CDN)

于 2014-10-12T19:41:59.310 回答
-2

CDN enables a user to fetch content from a CDN-POP that is geographically closest to the user thus allowing lower read latencies. Without a CDN, every request would reach the origin server (in your case Azure Storage). The low latency offered by CDN is achieved when there are cache hits. On a cache miss, a CDN-POP will fetch the content from the origin server reducing the latency benefit offered by CDN. Cache hits are usually dependent on whether the content is static (results in cache hits) or dynamic (results in cache miss) and its popularity (hot objects result in cache hit).

Your choice of using a CDN or not depends on a) whether your files are static or dynamic, if dynamic then the benefit of using a CDN is lower b) whether low latency is important to your application and c) Request rate : With low number of requests your files are likely to be cached-out so a CDN may not be that useful and d) Whether you have high scalability requirements. Note, Azure storage has the following scalability limits. If your application exceeds the scalability limits of azure storage then it is recommended to use a CDN

于 2014-08-07T00:25:13.367 回答