Azure Blob 存储上的静态 html 文件作为站点架构
static html files on azure blob storage as site architecture
最近我将我的网站移到了 Azure 并了解了 azure blob 存储。我的站点包含大量静态 html 文件。目前,这些文件由内容管理员生成并存储在特定文件夹中,例如/articles/some-article.html
。将这些文件存储为 blob 并直接从 cdn 将它们提供给 public 用户,这是一个明智的架构和 seo 明智的做法吗? (将链接从 example.com/articles/some-article.html
更改为 cdn.example.com/articles/some-aritcle.html
)。
更新
html 个文件将由 public 个用户直接使用。他们将通过链接或直接 url 访问它们。简单来说,它只是将静态 html articles/blog 帖子迁移到 Azure Blob 存储,而不是将它们保存在网站服务器上的文件夹中。它们是独立的 html 文件,很少重写。为了进一步说明,用户将浏览一个动态页面 example.com/articles
(mvc 5 网站),并且在该页面中将有一个指向 blob 的链接列表:
<h1>This is an article about stuff</h1>
<p>description description description description description description description description description description description description </p>
<a href="http://cdn.example.com/articles/article-about-stuff.html">Read more</a>
<h1>This is another article about stuff</h1>
<p>description description description description description description description description description description description description </p>
<a href="http://cdn.example.com/articles/article-about-other-stuff.html">Read more</a>
考虑到您的用例,将这些页面托管在 blob 存储中是完全合理的。将它们移至 blob 存储将释放 Web 服务器上的一些负载(因为现在静态内容将由 blob 存储提供服务)。此外,启用 CDN 将改善整体用户体验,因为用户将从距离他们最近的节点获得内容。
但是,请记住,您仍然无法使用 Azure Blob 存储托管静态网站,并且如果用户输入了一些不正确的内容 URL(或者可能会弄乱您应用程序中的链接[只是为了好玩 :)],它们将显示标准的 blob 存储错误消息。您无法自定义 blob 存储抛出的错误消息。
最近我将我的网站移到了 Azure 并了解了 azure blob 存储。我的站点包含大量静态 html 文件。目前,这些文件由内容管理员生成并存储在特定文件夹中,例如/articles/some-article.html
。将这些文件存储为 blob 并直接从 cdn 将它们提供给 public 用户,这是一个明智的架构和 seo 明智的做法吗? (将链接从 example.com/articles/some-article.html
更改为 cdn.example.com/articles/some-aritcle.html
)。
更新
html 个文件将由 public 个用户直接使用。他们将通过链接或直接 url 访问它们。简单来说,它只是将静态 html articles/blog 帖子迁移到 Azure Blob 存储,而不是将它们保存在网站服务器上的文件夹中。它们是独立的 html 文件,很少重写。为了进一步说明,用户将浏览一个动态页面 example.com/articles
(mvc 5 网站),并且在该页面中将有一个指向 blob 的链接列表:
<h1>This is an article about stuff</h1>
<p>description description description description description description description description description description description description </p>
<a href="http://cdn.example.com/articles/article-about-stuff.html">Read more</a>
<h1>This is another article about stuff</h1>
<p>description description description description description description description description description description description description </p>
<a href="http://cdn.example.com/articles/article-about-other-stuff.html">Read more</a>
考虑到您的用例,将这些页面托管在 blob 存储中是完全合理的。将它们移至 blob 存储将释放 Web 服务器上的一些负载(因为现在静态内容将由 blob 存储提供服务)。此外,启用 CDN 将改善整体用户体验,因为用户将从距离他们最近的节点获得内容。
但是,请记住,您仍然无法使用 Azure Blob 存储托管静态网站,并且如果用户输入了一些不正确的内容 URL(或者可能会弄乱您应用程序中的链接[只是为了好玩 :)],它们将显示标准的 blob 存储错误消息。您无法自定义 blob 存储抛出的错误消息。