故障转移ASP机器 [英] Failover ASP Machine

查看:65
本文介绍了故障转移ASP机器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



我们的内部网应用程序有两个内部服务器(Server1和Server2)。



当一台机器崩溃时,有没有人可以自动解决如何让机器中的任何人自动生存?

Hi All

We have two internal we server(Server1 and Server2) for our intranet application.

Could any one brief how to keep anyone of a machine live automaticaly when a machine have crashed?

推荐答案

你不能让机器保持活动因此,您所能做的就是尽量避免单点故障,使系统更具弹性。您可以让两台服务器并行运行(称为负载均衡),用于提高性能,如果出现故障,则故障转移。您可能需要查看 http://technet.microsoft.com /en-us/library/cc779570(v=ws.10).aspx [ ^ ]。您还需要考虑数据库复制,假设您有一个,因为这本身也会构成单点故障。



从ASP.NET的角度来看,您需要考虑如何存储ASP.NET会话。负载平衡器方面的一个选项是具有粘性会话,其中用户继续与一个服务器通信。鉴于您的故障转移方案,我不建议它,因为会话将与机器一起下降。另一种选择是将asp.net会话存储在公共持久性存储(通常是数据库)中,这会带来性能成本,如果您之前没有,则需要将数据库视为潜在的故障点。最后的事情更多的是问题,如果你设置一个故障转移环境,你将需要每台机器具有相同的机器密钥 [ ^ ]。



设置这些环境不是一件容易的事,不是你可以在这样的答案中给出详细的说明。也就是说,单个开发人员可以通过一些耐心和努力来做到这一点。即便如此,这并不能确保服务始终有效,只是降低了风险
You can''t "keep the machine live" as such all you can do is try to make the system more resilient by not having a single point of failure. You can have both servers running in parallel (called load balancing) which is used to improve performance and failover onto one if one goes down. You might want to take a look at http://technet.microsoft.com/en-us/library/cc779570(v=ws.10).aspx[^]. You also need to consider database replication assuming you have one, as this itself would constitue a single point of failure too.

From an ASP.NET standpoint you need to consider how you are storing ASP.NET session. One option on the load balancer side is to have sticky sessions, where a user continues to communicate with one server. Given your failover scenario, I wouldn''t recommend it as the session would go down with the machine. The other option is to store the asp.net session in a common persistence store (typically a database), this comes with a performance cost and you now need to consider the database as a potential point of failure if you didn''t before. The final thing is more of a gotcha, if you set up a failover environment you''ll need each machine to have the same machine key[^].

Setting these environments up isn''t a facile task, not something you could give detailed instructions for in an answer like this. That said it is possible for a single developer to do this with a bit of patience and effort. Even so this doesn''t ensure the service is always up, it just mitigates risk


这篇关于故障转移ASP机器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆