azure云 试用

As I've mentioned lately, I'm quietly moving my Website from a physical machine to a number of Cloud Services hosted in Azure. This is an attempt to not just modernize the system - no reason to change things just to change them - but to take advantage of a number of benefits that a straight web host sometimes doesn't have. I want to have multiple microsites (the main page, the podcast, the blog, etc) with regular backups, CI/CD pipeline (check in code, go straight to staging), production swaps, a global CDN for content, etc.

正如我最近提到的,我正在将我的网站从一台物理机悄悄地转移到Azure中托管的许多Cloud Services。 这不仅是对系统进行现代化改造的尝试-没有理由仅仅为了改变而进行更改-而是利用纯Web主机有时没有的许多好处。 我想拥有多个带有常规备份的微型站点(主页,播客,博客等),CI / CD管道(签入代码,直接进行登台),生产交换,内容的全局CDN等。

I'm breaking a single machine into a series of small sites BUT I want to still maintain ALL my existing URLs (for good or bad) and the most important one is hanselman.com/blog/ that I now want to point to hanselmanblog.azurewebsites.net.

我正在将一台计算机划分为一系列小型站点,但我仍想保留所有现有URL(无论好坏),最重要的是hanselman.com/blog/ ,现在我要指向hanselmanblog。 azurewebsites.net

That means that the Azure Front Door will be receiving all the traffic - it's the Front Door! - and then forward it on to the Azure Web App. That means:

这意味着Azure前门将接收所有流量-这是前门! -然后将其转发到Azure Web App。 这意味着:

  • hanselman.com/blog/foo -> hanselmanblog.azurewebsites.net/foo hanselman.com/blog/foo-> hanselmanblog.azurewebsites.net/foo
  • hanselman.com/blog/bar -> hanselmanblog.azurewebsites.net/foo hanselman.com/blog/bar-> hanselmanblog.azurewebsites.net/foo
  • hanselman.com/blog/foo/bar/baz -> hanselmanblog.azurewebsites.net/foo/bar/bazhanselman.com/blog/foo/bar/baz-> hanselmanblog.azurewebsites.net/foo/bar/baz

There's a few things to consider when dealing with reverse proxies like this and I've written about that in detail in this article on Dealing with Application Base URLs and Razor link generation while hosting ASP.NET web apps behind Reverse Proxies.

处理诸如此类的反向代理时,需要考虑一些事情,而我在本文中详细论述了这一点,该文章涉及在反向代理后面托管ASP.NET Web应用程序时处理应用程序基本URL和Razor链接生成。

You can and should read in detail about Azure Front Door here.

您可以并且应该在此处详细了解有关Azure前门的信息。

It's worth considering a few things. Front Door MAY be overkill for what I'm doing because I have a small, modest site. Right now I've got several backends, but they aren't yet globally distributed. If I had a system with lots of regions and lots of App Services all over the world AND a lot of static content, Front Door would be a perfect fit. Right now I have just a few App Services (Backends in this context) and I'm using Front Door primarily to manage the hanselman.com top level domain and manage traffic with URL routing.

值得考虑一些事情。 前门可能对我正在做的事情有些大材小用,因为我的网站很小而谦虚。 目前,我有多个后端,但它们尚未在全球范围内分布。 如果我的系统遍布世界各地,拥有许多应用程序服务,并且包含大量静态内容,那么前门将是一个完美的选择。 现在,我只有几个应用程序服务(在此情况下为后端),并且我主要使用Front Door来管理hanselman.com顶级域并通过URL路由管理流量。

On the plus side, that might mean Azure Front Door was exactly what I needed, it was super easy to set up Front Door as there's a visual Front Door Designer. It was less than 20 minutes to get it all routed, and SSL certs too just a few hours more. You can see below that I associated staging.hanselman.com with two Backend Pools. This UI in the Azure Portal is (IMHO) far easier than the Azure Application Gateway. Additionally, Front Door is Global while App Gateway is Regional. If you were a massive global site, you might put Azure Front Door in ahem, front, and Azure App Gateway behind it, regionally.

从好的方面来说,这可能意味着Azure前门正是我所需要的,因为有一个可视化的前门设计器,所以设置前门非常容易。 路由全部过程不到20分钟,而SSL证书也只需要几个小时。 您可以在下面看到我将staging.hanselman.com与两个后端池相关联。 Azure Portal中的此UI(IMHO)比Azure Application Gateway容易得多。 此外,“前门”是“全局”,而“应用程序网关”是“区域” 。 如果您是一个庞大的全球站点,则可以将Azure前门放置在前部,而将Azure App Gateway放置在该区域的后方。

Again, a little overkill as my Pools are pools are pools of one, but it gives me room to grow. I could easily balance traffic globally in the future.

再次强调一下,因为我的“池”是一个池,不过这给了我成长的空间。 将来我可以轻松平衡全球流量。

CONFUSION: In the past with my little startup I've used Azure Traffic Manager to route traffic to several App Services hosted all over the global. When I heard of Front Door I was confused, but it seems like Traffic Manager is mostly global DNS load balancing for any network traffic, while Front Door is Layer 7 load balancing for HTTP traffic, and uses a variety of reasons to route traffic. Azure Front Door also can act as a CDN and cache all your content as well. There's lots of detail on Front Door's routing architecture details and traffic routing methods. Azure Front Door is definitely the most sophisticated and comprehensive system for fronting all my traffic. I'm still learning what's the right size app for it and I'm not sure a blog is the ideal example app.

结论:过去,在我的小规模创业公司中,我使用Azure Traffic Manager将流量路由到全球托管的多个App Services。 当我听说前门时,我很困惑,但似乎流量管理器对于任何网络流量来说都是全局DNS负载平衡,而前门是HTTP流量的第7层负载平衡,并使用多种原因来路由流量。 Azure前门还可以充当CDN并缓存所有内容。 关于前门的路由架构细节和交通路由方法,有很多细节。 Azure前门无疑是用于处理我所有流量的最复杂,最全面的系统。 我仍在学习什么是最合适的应用程序,但是我不确定博客是否是理想的示例应用程序。

Here's how I set up /blog to hit one Backend Pool. I have it accepting both HTTP and HTTPS. Originally I had a few extra Front Door rules, one for HTTP, one for HTTPs, and I set the HTTP one to redirect to HTTPS. However, Front door charges 3 cents an hour for the each of the first 5 routing rules (then about a penny an hour for each after 5) but I don't (personally) think I should pay for what I consider "best practice" rules. That means, forcing HTTPS (an internet standard, these days) as well as URL canonicalization with a trailing slash after paths. That means /blog should 301 to /blog/ etc. These are simple prescriptive things that everyone should be doing. If I was putting a legacy app behind a Front Door, then this power and flexibility in path control would be a boon that I'd be happy to pay for. But in these cases I may be able to have that redirection work done lower down in the app itself and save money every month. I'll update this post if the pricing changes.

这是我设置/ blog命中一个后端池的方法。 我接受HTTP和HTTPS。 最初,我有一些额外的前门规则,一个用于HTTP,一个用于HTTP,然后将HTTP设置为重定向到HTTPS。 但是,前门的前5条路由规则每条每小时收取3美分的费用(5条后每条每小时收取1美分的费用),但是我(个人)认为我不应该为自己认为的“最佳做法”付钱规则。 这意味着,强制使用HTTPS(目前是互联网标准)以及URL规范化,并在路径后添加斜杠。 这意味着/ blog应该是301到/ blog /等。这是每个人都应该做的简单的规定性事情。 如果我将遗留应用程序放在前门后面,那么路径控制的强大功能和灵活性将是我乐意为此付出的福音。 但是在这些情况下,我也许可以在应用程序本身中降低重定向工作的工作量,并每月节省资金。 如果价格发生变化,我将更新这篇文章。

After I set up Azure Front Door I noticed my staging blog was getting hit every few seconds, all day forever. I realized there are some health checks but since there's 80+ Azure Front Door locations and they are all checking the health of my app, it was adding up to a lot of traffic. For a large app, you need these health checks to make sure traffic fails over and you really know if you app is healthy. For my blog, less so.

设置Azure前门后,我发现我的登台博客每隔几秒钟就会受到攻击,直到一整天。 我意识到有一些运行状况检查,但是由于有80多个Azure前门位置,并且它们都在检查我的应用程序的运行状况,所以这增加了很多流量。 对于大型应用程序,您需要进行这些运行状况检查,以确保流量能够故障转移,并且您真正知道自己的应用程序是否运行状况良好。 对于我的博客,情况并非如此。

There's a few ways to tell Front Door to chill. First, I don't need Azure Front Door doing a GET requests on /. I can instead ask it to check something lighter weight. With ASP.NET 2.2 it's as easy as adding HealthChecks. It's much easier, less traffic, and you can make the health check as comprehensive as you want.

有几种方法可以告诉前门放松。 首先,我不需要Azure前门在/上执行GET请求。 相反,我可以要求它检查重量更轻的东西。 使用ASP.NET 2.2,就像添加HealthChecks一样容易。 这更容易,流量更少,您可以根据需要进行全面的健康检查。

app.UseHealthChecks("/healthcheck");

Next I turned the Interval WAY app so it wouldn't bug me every few seconds.

接下来,我打开了Interval WAY应用程序,这样它就不会每隔几秒钟就打扰我一次。

These two small changes made a huge difference in my traffic as I didn't have so much extra "pinging."

这两个小变化对我的流量产生了巨大的影响,因为我没有太多额外的“ ping”。

After setting up Azure Front Door, I also turned on Custom Domain HTTPs and pointing staging to it. It was very easy to set up and was included in the cost.

设置Azure前门后,我还打开了“自定义域HTTP”并指向其暂存。 设置非常简单,并已包含在成本中。

I haven't decided if I want to set up Front Door's caching or not, but it might mean an easier, more central way than using a CDN manually and changing the URLs for my sites static content and images. In fact, the POP (Point of Presense) locations for Front Door are the same as those for Azure CDN.

我尚未决定是否要设置前门的缓存,但这可能意味着比手动使用CDN和更改网站静态内容和图像的URL更为简便,集中的方式。 实际上,前门的POP(提示点)位置与Azure CDN的位置相同。

NOTE: I will have to at some point manage the Apex/Naked domain issue where hanselman.com and www.hanselman.com both resolve to my website. It seems this can be handled by either CNAME flattening or DNS chasing and I need to check with my DNS provider to see if this is supported. I suspect I can do it with an ALIAS record. Barring that, Azure also offers a Azure DNS hosting service.

注意:我将不得不在某个时候管理Apex / Naked域问题,其中hanselman.com和www.hanselman.com都可以解决我的网站。 看来这可以通过CNAME拼合或DNS跟踪来解决,我需要与我的DNS提供者联系以查看是否支持此操作。 我怀疑我可以使用ALIAS记录来做到这一点。 除此以外,Azure还提供了Azure DNS托管服务。

There is another option I haven't explored yet called Azure Application Gateway that I may test out and see if it's cheaper for what I need. I primarily need SSL cert management and URL routing.

我还没有测试过另一种尚未使用的选项,称为Azure应用程序网关,我可以对其进行测试,看看它是否比我所需要的便宜。 我主要需要SSL证书管理和URL路由。

I'm continuing to explore as I build out this migration plan. Let me know your thoughts in the comments.

在制定此迁移计划时,我将继续探索。 在评论中让我知道您的想法。

翻译自: https://www.hanselman.com/blog/real-world-cloud-migrations-azure-front-door-for-global-http-and-path-based-loadbalancing

azure云 试用

azure云 试用_真实世界的云迁移:Azure前门,用于全局HTTP和基于路径的负载平衡相关推荐

  1. 什么叫云平台_为什么说云原生会成为未来企业技术变迁的趋势

    云原生是当下的热点话题,但是很多人对云原生有很多误解,特别是传统产业物联网或工控.物联网行业对云原生显得"后知后觉".与其在这里说是预测,不如说是现在进行时,只是由于传统产业本身的 ...

  2. 最优惠租云服务器_租一个云服务器一个月需要多少钱?

    ++++++++ 12.8日更新「2020双十二活动」 来不及解释了,该上车了!阿里云 双十二拼团会场​www.aliyun.com腾讯云 双十二限时秒杀​cloud.tencent.com 云服务器 ...

  3. 组态软件运行在云服务器_能在云服务器上运行软件吗

    能在 云 1.Windows系统的云服务器,可以安装使用与之对应的windows软件,注意要在防火墙把应用端口开放,以便对外提供服务. 2.Linux系统的云服务器,不能像安装windows软件那样, ...

  4. 饥荒联机云服务器_饥荒联机云服务器开档

    解决问题: 问题1:如何设置云服务器putty(远程登录客户端:连接云服务器用) WinSCP(图形化 SFTP 客户端:用于本地和云服的文件传输)给的是安装包需要安装 开服脚本.steamcommu ...

  5. 收费最低的云存储_亿方云好不好?亿方云怎么收费?

    用户在使用亿方云进行数据文档存储工作时,往往会思考:亿方云好不好?亿方云好用吗?亿方云收费吗,价格多少? 接下来,小编就为大家提供完整的亿方云怎么样,怎么收费的信息. 亿方云好不好? 当我们考虑亿方云 ...

  6. vpc开的云服务器_腾讯云私有网络 VPC 如何配置云服务器为公网网关?

    当您在腾讯云私有网络 VPC 中的部分云服务器没有普通公网 IP,但需要访问公网时,可以利用带有公网 IP(普通公网 IP 或弹性公网 IP) 的云服务器访问公网.公网网关云服务器将对出网流量进行源地 ...

  7. java云开发_快速入门云开发

    什么是云开发 这里引用官方的一段描述: 云开发(Tencent CloudBase,TCB)是云端一体化的后端云服务 ,采用 serverless 架构,免去了移动应用构建中繁琐的服务器搭建和运维.同 ...

  8. php 汉王云名片_超弦云名片,让你彻底告别纸质名片!

    原标题:超弦云名片,让你彻底告别纸质名片! 随着科技时代的进一步发展,带给我们的不仅仅是更多的机遇,也有着很多的方便之处,就像我们以前经常使用的一个纸质名片一样,因为如今社交环境的复杂多变,递出去一个 ...

  9. lora终端连接云服务器_腾讯云服务器上安装mysql,并用navicat连接

    1.用xshll连接腾讯云 用ftp连接腾讯云 可以传输文件,这个就不说了 2.登录官网,下载linux版本,下载liunx-server 和linux-server两个压缩包 3.用ftp将下载下来 ...

最新文章

  1. 解决htmlfile: 未知的运行时错误
  2. 10个用于处理日期和时间的 Python 库
  3. 机器学习和深度学习笔记(Matlab语言实现)
  4. java中hotspot_Java 8中HotSpot选项的改进文档
  5. 手机电脑自适应导航源码php,自适应各终端懒人网址导航源码 v2.0
  6. 9.2 LSMW程序创建操作手册 第3 4步
  7. 艾伟也谈项目管理,学习腾讯的产品管理之道
  8. 【Unity Native Plugins】1.调用动态库so-android篇 附录完整工程
  9. oracle怎么看日志文件,Oracle日志文件的管理与查看
  10. 萤石摄像头实现web端监控预览以及录像回放
  11. 深入理解GatewayWorker框架
  12. 02、RabbitMQ之交换机
  13. 线段覆盖 java,南邮 OJ 1407 线段覆盖
  14. 微信机器人控制linux,关于微信公共平台聊天机器人控制开启和关闭的代码
  15. 3d 图表的javaapi
  16. 关于duilib在Layered Window下绘制文字不正常的BUG
  17. 如何在ARM平台编译NAMD
  18. 解决时间机器无法识别硬盘问题
  19. Barrier与多线程
  20. signature=839c980ea2bb48be66699d26946b8c01,3922张仅包含车牌的图片,图片名字表示车牌号码...

热门文章

  1. 熟人社交的突围,从00后开始?聊聊微信前产品总监孵化的“画音”
  2. 根据url,本地文件下载
  3. 树莓派学习(三):安装pytorch并验证
  4. Codeforces Round #646 (Div. 2)E. Tree Shuffling 题解(dfs)
  5. 电大计算机文化基础形考所有答案,电大计算机文化基础形考一答案(5页)-原创力文档...
  6. 《 Recent Advances in Deep Learning-based Dialogue Systems 》:Neural Models in Dialogue Systems
  7. 功率谱分析笔记-------脑电相关
  8. python中使用保留字引用当前程序以外的功能库_Python中使用_______保留字引用当前程序以外的功能库...
  9. \r \n \r\n区别
  10. ARM64中的内存屏障指令