NLB 和 Web 部署

发布于 2024-08-29 21:57:32 字数 364 浏览 3 评论 0 原文

我在一个集群中有两个网络服务器为网络应用程序提供服务。

使用 MS Web Deploy 将应用程序的新版本推送到一台服务器,然后再次将文件同步到集群中的另一台服务器。这似乎是最平常的事情。

但是,当一台服务器部署了新版本,而另一台服务器尚未完成时,会不会出现问题。当加载新版本的页面发出Web服务请求并且平衡器将请求发送到旧版本的服务器时,这不会造成麻烦吗?

避免这种情况的最佳方法是什么?

我考虑编写我们部署到的服务器的排水管脚本,并确保一次只有一台服务器在运行。但我找不到其他人似乎写过这样的解决方案。并且猜测它的扩展性也不是很好。

另一种解决方案可能是在更新时关闭所有服务器。但这似乎不太聪明。

有什么建议吗?

I have two webservers in a cluster serving a web application.

Using MS Web Deploy to push a new version of the application to one server, and then again to synchronize the files to the other server in the cluster. It seems to be the most ordinary thing to do.

But wouldn't there be a problemm, when one server is deployed with the new version, and the other is not yet finished. Will it not cause troubles, when a page loaded with the new version makes a webservice request and the balancer sends the request to the server with the old version?

What's the best way to avoid this?

I thought about scripting a drainstop of the server, that we deploy to, and make sure only one server is running at a time. But I can't find anyone else, who seems to have written about such a solution. And guess that it doesn't scale very well too.

Another solution could be to shut down all servers when updating. But that doesn't seems very clever.

Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

﹂绝世的画 2024-09-05 21:57:32

您可以使用DFS,以便文件基本上立即复制到其他服务器(s)。

此外,您还可以编辑每台服务器的主机文件,以便每台服务器都使用它自己的托管服务,而不是通过 NLB 并可能转到另一台服务器。当您已经在服务器上时,很少有理由去另一台服务器,它只会导致像您提到的那样令人头痛并降低性能。

You could use DFS so that the files are basically instantly copied over to the other server(s).

Also, you could edit the host files of each server so that each server uses it's own hosted services instead of going through NLB and potentially going to another server. There is rarely a reason to go to another server when you are already on a server, it only causes headaches like you mentioned and decreases performance.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文