缩放ASP.NET应用程序 [英] Scaling an ASP.NET application

查看:125
本文介绍了缩放ASP.NET应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个很广泛的问题,但我希望我能得到有用的提示。目前,我有一台服务器上运行的ASP.NET应用程序。我现在需要扩展以适应客户日益提高的负载。所以,我的计划是:

This is a very broad question, but hopefully I can get useful tips. Currently I have an ASP.NET application that runs on a single server. I now need to scale out to accommodate increasing customer loads. So my plan is to:

1)向外扩展的ASP.NET和Web组件到五台服务器。

1) Scale out the ASP.NET and web component onto five servers.

2)移动数据库到一个农场。

2) Move the database onto a farm.

我不相信,我将有一个问题与数据库,因为它只是一个单一的IP地址,至于应用程序而言。不过,我现在关注有关ASP.NET和Web层。有些问题我已经担心:

I don't believe I will have an issue with the database, as it's just a single IP address as far as the application is concerned. However, I am now concerns about the ASP.NET and web tier. Some issues I am already worried about:


  • 是实现只是一个负载均衡,将农场出来要求每五个服务器在循环方式最简单的模式?

  • Is the easiest model to implement just a load balancer that will farm out requests to each of the five servers in a round-robin fashion?

有没有使用HTTPS和SSL连接,现在有任何问题,他们可以在不同物理服务器终止请求时每次? (例如,性能如何?)

Is there any problem with HTTPS and SSL connections, now that they can terminate on different physical servers each time a request is made? (for example, performance?)

是否与通过cookie关于保养的会话(登录)的关注?我的猜测是没有的,但不能完全解释为什么...; - )

Is there any concern with regards to session maintanence (logon) via cookies? My guess is no, but can't quite explain why... ;-)

是否与会话数据本身(存储服务器端)的任何关注?很显然,我需要复制会话状态的服务器之间,或以某种方式强制要求,只能到一台服务器。无论哪种方式,我在这里看到一个问题...

Is there any concern with session data itself (stored server side)? Obviously I will need to replicate session state between servers, or somehow force a request to only go to a single server. Either way, I see a problem here...

推荐答案

正如David指出,很多这个问题真是多的行政的事,可能是ServerFault有用。链接他的职位有很好的信息,以钻研。

As David notes, much of this question is really more of an Administrative thing, and may be useful on ServerFault. The link he posts has good info to pore over.

有关你的会话的问题:你会想看看在任的会话状态服务(自带的IIS作为一个单独的服务,保持状态,常见的多台服务器之间)和/或在SQL数据库中存储asp.net会话状态。两者都是你可以找到大卫·斯特拉顿的链接选项,我敢肯定。

For your Session questions: You will want to look at either the Session State Service (comes with IIS as a separate service that maintains the state in common between multiple servers) and/or storing asp.net session state in a SQL database. Both are options you can find at David Stratton's link, I'm sure.

在很大程度上来说,一旦你建立你的进程外的会话状态,它是透明的,否则。它要求你存储在会话序列化的对象,虽然。

Largely speaking, once you set up your out-of-process session state, it is otherwise transparent. It does require that you store Serializable objects in Session, though.

循环DNS是负载平衡在这种情况下最简单的方法,是的。它没有考虑到实际负载的每个服务器上,并且也没有因为当一台服务器可能停机维护任何规定;人谁得到特定IP会看到该网站作为是'下来',即使其他四台服务器可能正在运行。

Round-Robin DNS is the simplest way to load-balance in this situation, yes. It does not take into account the actual load on each server, and also does not have any provision for when one server may be down for maintenance; anyone who got that particular IP would see the site as being 'down', even though four other servers may be running.

负载均衡和处理SSL连接可能会从一个反向代理类型的情况都受益;其中,代理处理所有的连接进来,但所有它做的是加密和实际的请求负载均衡到Web服务器。 (这些问题是更多的行政结束,当然,但是......)

Load balancing and handling SSL connections might both benefit from a reverse proxy type of situation; where the proxy handles all the connections coming in, but all it's doing is encryption and balancing the actual request load to the web servers. (these issues are more on the Administration end, of course, but...)

饼干不会是一个问题所提供的所有Web服务器是广告本身为同一网站(通过主机头,等)。每个服务器都会欣然接受使用同一域名的任何其他服务器设置,饼干不知道或关心什么服务器发送它;它是基于Web浏览器连接到时,它得到一个cookie值的服务器的主机名。

Cookies will not be a problem provided all the web servers are advertising themselves as being the same web site (via the host headers, etc). Each server will gladly accept the cookies set by any other server using the same domain name, without knowing or caring what server sent it; It's based on the host name of the server the web browser is connecting to when it gets a cookie value.

这篇关于缩放ASP.NET应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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