是的你可以。
您至少需要 2 个站点来实现这一点。一个将获取请求并通过重写规则将它们路由到 ARR,另一个将是 ARR 后面的节点。
例如,考虑您的域名是“example.com”:
IIS
- Site 1 (binding: http://example.com:80)
- Site 2 (binding: http://127.0.0.1:22001)
Rewrite Rule
- Match All
- {HTTP_HOST} matches example.com
- {SERVER_PORT} does not match 22001
- Action: Route to Farm
Run Code Online (Sandbox Code Playgroud)
这是进行零停机部署的良好起点。如果您想了解更多信息,请在 GitHub 上查看此 repo:https : //github.com/yosoyadri/IIS-ARR-Zero-Downtime