本文主要介绍Windows Azure 应用程序网关三种主要功能介绍:Http负载平衡、基于cookie会话连接、SSL卸载
Azure应用程序网关(Azure Application Gateway)
基础环境准备,在虚拟网络中为应用程序网关创建一个子网,在本文中使用AppGateway-1子网。
New-AzureApplicationGateway
-Name WinAppGW -VnetName AppGatewayVnet -Subnets AppGateway-1
#新建应用程序网关,命名为WinAppGW,放置在虚拟网络AppGatewayVnet子网AppGateway-1内
#此时不会开始计收网关的费用。计费将在后面已成功启动网关时开始
Get-AzureApplicationGateway
#获取网关的详细信息
Start-AzureApplicationGateway
-Name WinAppGW
#尝试启动网关,提示“由于没有进行任何配置,无法启动”
既然这样,我们先配置“Http负载平衡”的功能。
【Part.1】HTTP load balancing(Http负载平衡)
1.对比Azure负载平衡器VS Azure应用程序网关
Azure Load Balancer,工作在传输层工作,TCP/UDP,提供4层负载均衡
Azure Application Gateway提供Http流量的路由规则,进一步对7层的http流量进行负载均衡
2.Application Gateway通过配置,可以将Http流量路由至虚拟机、云服务、web app、外部IP。
3.实验过程:
使用两台虚拟机作为后端web服务器集群:wina