IIS负载均衡配置

更新记录#

点击查看
2024年4月5日 初始化。

准备#

准备4台 Windows Server(测试环境 Vmware 下 Windows Server 2022 x86_64)

目标#

一台前置 IIS 转发请求,3台IIS用于提供ASP.NET Core服务。

设备结构#

先给4台Windows Server配置安装IIS。
image

配置提供服务的IIS 192.168.1.7、192.168.1.5、192.168.1.9#

按照自己的要求配置ASP.NET应用 或者 ASP.NET Core应用即可。
IIS配置部署ASP.NET Core应用教程:https://www.cnblogs.com/cqpanda/p/16149134.html

配置前置IIS 192.168.1.8#

安装包#

(按顺序安装)
url-rewrite

https://iis-umbraco.azurewebsites.net/downloads/microsoft/url-rewrite

application-request-routing

https://iis-umbraco.azurewebsites.net/downloads/microsoft/application-request-routing

安装好后会在IIS管理界面,显示Server Farms
image

代理站点设置#

把代理站点的 应用程序池 的 超时时间改为0
image

把代理站点的 应用程序池 的 回收的固定时间间隔 去掉
image

Farms中新建Farm#

然后在Farms中新建Farm把对应的服务IIS的信息加入即可。
image

添加完成后:
image

测试服务器节点是否正常#

使用Health Test
image

输入代理站点的URL,点击测试按钮
image

负载均衡策略设置#

image

可以自定义权重
image

查看请求情况#

image

具体测试使用jmeter。

参考链接#

https://zhuanlan.zhihu.com/p/142897766
https://www.cnblogs.com/webapi/p/5669089.html
https://learn.microsoft.com/zh-cn/iis/web-hosting/scenario-build-a-web-farm-with-iis-servers/configuring-step-3-configure-iis-web-farm-load-balancing
https://learn.microsoft.com/zh-cn/iis/web-hosting/scenario-build-a-web-farm-with-iis-servers/configuring-step-4-configure-ssl-central-certificate-store
https://learn.microsoft.com/zh-cn/iis/web-hosting/scenario-build-a-web-farm-with-iis-servers/configuring-step-2-configure-iis-web-farm-servers
https://learn.microsoft.com/zh-cn/iis/web-hosting/scenario-build-a-web-farm-with-iis-servers/planning-step-3-plan-iis-web-farm-load-balancing
https://learn.microsoft.com/zh-cn/iis/web-hosting/scenario-build-a-web-farm-with-iis-servers/configure-a-web-farm-with-iis-servers
https://learn.microsoft.com/zh-cn/iis/get-started/introduction-to-iis/hosting-friendly-web-server-platform-iis-scenario-overview
https://zhuanlan.zhihu.com/p/272799312
https://learn.microsoft.com/zh-cn/iis/extensions/installing-application-request-routing-arr/install-application-request-routing
https://www.jianshu.com/p/ff16434d96fb
https://www.cnblogs.com/jerviscui/p/10818173.html
https://www.cnblogs.com/jinrain/p/6805995.html

作者:重庆熊猫

出处:https://www.cnblogs.com/cqpanda/p/18115536

版权:本作品采用「不论是否商业使用都不允许转载,否则按3元1字进行收取费用」许可协议进行许可。

posted @   重庆熊猫  阅读(432)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2023-04-07 vuejs 关闭 eslint
more_horiz
keyboard_arrow_up dark_mode palette
选择主题
menu
点击右上角即可分享
微信分享提示