.net 应用程序的负载平衡或故障转移服务器

发布于 2024-07-19 03:02:57 字数 262 浏览 7 评论 0原文

设想 我有用 c#.net 编写的服务。

现在,在我的生产环境中,我希望此服务位于两台不同的服务器上,以实现其中一台服务器的负载平衡或故障转移。

因此,例如,如果一台服务器挂掉,服务将在另一台服务器上继续运行,用户不会受到影响,或者如果站点负载过重,用户会被重定向到不同的服务器。

对于在不同服务器上重定向的用户来说不是问题,我们有软件可以检查服务是否正在运行。 这种情况下如何进行会话管理呢?

我们怎样才能做到这一点?

Scenario
I have service written in c#.net.

Now on my production environment I want this service to be on 2 different servers for Loadbalancing or failover of one of the server.

So for instance if one server dies the service keeps running on the other server and users are not affected OR if there is a heavy load on the site users get redirected to different servers.

For users getting on redirected on different servers is not a problem we have the software which can check whether the service is running or not. How to do session management in this case?

How can we achieve this?

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

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

发布评论

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

评论(2

小女人ら 2024-07-26 03:02:57

当然,您始终可以构建自己的会话管理服务,但我认为这不是您想要的。

我有使用 NCache 进行会话管理的经验,并且效果很好。

Microsoft 还有 速度,但我不确定它是否已完成。

Of course you could always spin your own session management service but I don't think that is what you are looking for.

I have experience using NCache for session management and it works well enough.

Microsoft also has Velocity but I'm not sure it's complete yet.

偷得浮生 2024-07-26 03:02:57

很老的问题,但仍然可以通过谷歌搜索。 从 Windows 2012 开始,有一个名为“集群共享任务”的功能。 可能还不成熟,因为它只能通过 PowerShell 进行管理,但也许是一个好的开始。 查看此 MSDN 帖子。 我很想亲自尝试一下。

Very old question, but still searchable by Google. Since Windows 2012 there is feature called Clustered Shared Tasks. Probably not mature yet as it is manageble only via PowerShell, but maybe good start. Check this MSDN post. I'm eager to try it myself.

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