henny penny视频_Penny Pinching视频:在数据中心之间移动Azure网站

henny penny视频

henny penny视频

I talked about Pinching pennies when scaling in The Cloud last week when I added jQuery lazy loading to my podcast's Website. I wanted to avoid paying any unnecessary bandwidth costs. The result was great and I'll be under my bandwidth this month.

上周,当我在播客的Website上添加jQuery延迟加载时,我谈到了在The Cloud上进行扩展时的捏钱问题。 我想避免支付任何不必要的带宽成本。 结果非常好,本月我会用尽带宽。

I'm continuing to look for ways to optimize and pinch pennies in the cloud. I realized recently that while my Website was running in the West US Azure datacenter, the database (managed by Carl Franklin's podcasting company) was running in North Central US. This means I was paying for the bandwidth of my database calls. Not to mention, it was slower, not the best idea, plus I was calling into a SQL Server over the open internet (although I had opened the firewall to do so).

我一直在寻找优化和缩小云计算成本的方法。 最近我意识到,当我的网站在美国西部Azure数据中心中运行时,该数据库(由卡尔·富兰克林的播客公司管理)正在美国中北部运行。 这意味着我要为数据库调用的带宽付费。 更不用说,它比较慢,不是最好的主意,而且我正在通过开放的Internet调用SQL Server(尽管我已经打开了防火墙来这样做)。

This is unusual to have a website and SQL Database so far apart, of course, as you'll usually make your site and database at the same time in the same place. Azure also goes out of it's way to keep these linked resources together as you build them.

当然,网站和SQL数据库之间的距离如此之遥是不寻常的,因为您通常会在同一时间在同一位置同时创建您的网站和数据库。 Azure还可以在构建它们时将这些链接的资源保持在一起。

However, Carl had setup the database and original website a while back, and I only just redesigned it and moved it to Azure recently. Additionally, the administrative backend for the Hanselminutes podcast was in North Central, so we found ourselves in this position.

但是,Carl不久前已经设置了数据库和原始网站,而我只是重新设计了它,最近才将其移至Azure。 此外,Hanselminutes播客的管理后端在中北部,因此我们处于这个位置。

Azure Websites capacity opened up in the North Central datacenter, so I took lunch to move my site. You can't just click "move," but it's actually very easy to redeploy. The whole process including DNS changes took less than 15 minutes as you can see in the YouTube video above.

北部中央数据中心开放了Azure网站的容量,因此我吃了午餐移动了我的网站。 您不能只单击“移动”,但是实际上非常容易重新部署。 如您在上面的YouTube视频中所见,包括DNS更改在内的整个过程用了不到15分钟的时间。

Here's the steps I used:

这是我使用的步骤

  • I made a new site in the new Data Center

    我在新的数据中心创建了一个新站点
  • I made it Shared so I could use a custom domain (or you can use Reserved)

    我将其设为共享,以便可以使用自定义域(也可以使用保留)
  • I took the domain names off the West US site, and moved them within the Portal to the North Central one

    我从美国西部站点上取下了域名,并将其在门户网站中移至了北部中部

    • If this site was super important I would have had a load balancer and kept both sites up while I waited, but total downtime was like 5 min so I didn't sweat it for this.

      如果该站点非常重要,那么我将拥有一个负载均衡器,并在等待时将两个站点都保持正常运行,但是总停机时间约为5分钟,因此我为此不费力气。
  • I ensured the database within North Central was a "Linked Resource" within my Website

    我确保North Central内的数据库是我网站中的“链接资源”
  • I made sure my new website had the right connection strings in configuration.

    我确保我的新网站在配置中具有正确的连接字符串。
  • I downloaded the new website's publish profile and imported it anew into WebMatrix (or Visual Studio, etc)

    我下载了新网站的发布配置文件,并将其重新导入到WebMatrix(或Visual Studio等)中
  • Published the site using the new publish profile.

    使用新的发布配置文件发布了网站。
  • Cleared DNS and visited the site and confirmed it worked.

    清除DNS并访问了该站点并确认它可以正常工作。
  • Deleted the old site.

    删除旧站点。

It worked well and I'm happy with the result. My next penny pinching step (and a nice geo-load balanced optimization) will be to move all the images to the CDN so that folks overseas get edge caching...that means that Australians will get the images for the site served from a nearby datacenter. I'll get this extra benefit for less than I am paying for website bandwidth.

效果很好,我对结果感到满意。 我接下来的一分钱紧缩步骤(以及一个不错的地理位置均衡优化)将是将所有图像移至CDN,以便海外人员获得边缘缓存...这意味着澳大利亚人将从附近的站点获取该站点的图像数据中心。 我将以比为网站带宽支付的价格少的价格获得这种额外的好处。

相关链接 (Related Links)

翻译自: https://www.hanselman.com/blog/penny-pinching-video-moving-an-azure-website-between-data-centers

henny penny视频

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值