相同的 ASP.Net 应用程序 - 多个 IIS 站点
一个快速的 ASP.Net 性能问题...
我有一个 ASP.Net 3.5 SP1 应用程序,我想在 IIS 6 上运行。出于 SSL 证书的原因,我需要在 IIS 中的单独站点上运行它。它是一个 CMS,一些客户需要添加自己的 SSL 证书。
1) 我可以在 IIS 的多个站点上运行磁盘上的同一组 ASP.Net 文件吗?还是需要对它们进行镜像?
2)在性能方面我需要考虑哪些因素,例如每个站点都有多个数据库连接?或者他们会被“汇集”?另外,我正在使用 Linq to SQL 并使用 ASP.Net 的缓存来缓存结果。为每个 IIS 站点提供基本相同数据的单独缓存是否会产生开销?对于这种情况还有其他性能或应用程序设计考虑吗?
3) 在同一个应用程序池下运行 IIS 站点有什么区别吗?
或者有人有完全不同的建议吗?
您能提供的任何指导将不胜感激。我在这里寻找尽可能多的不同意见和经验,所以如果您能提供帮助,请添加答案。
干杯, 蒂姆
A quick ASP.Net performance question...
I have an ASP.Net 3.5 SP1 Application that I want to run on IIS 6. For SSL certificate reasons I need to run it on separate sites in IIS. It's a CMS, and some clients will need the add their own SSL certs.
1) Can I run the same set of ASP.Net files on the disk on multiple sites in IIS or do I need to mirror them?
2) What considerations do I need to make in terms of performance, e.g. having multiple database connections from each site?? Or will they be 'pooled'?! Also, I am using Linq to SQL and am caching the results using ASP.Net's cache. Will it be an overhead to have separate caches for each IIS site of essentially the same data? Are there any other performance or application design considerations for this scenario?
3) Does running the IIS sites under the same App Pool make any difference?
Or does anyone have a totally different recommendations?
Any guidance you can give would be much appreciated. I'm looking for as many varied opinions and experiences as possible here, so please do add an answer if you can help.
Cheers,
Tim
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您只需要管理一个 IIS 站点,维护将会容易得多。更有效的方法是在其他地方处理 SSL 问题(例如,硬件负载平衡器、内容交换机、Apache 盒等),并反向代理到运行单个版本的应用程序的单个 IIS 实例。共享应用程序池不会有帮助(假设您无论如何都将 SQL Server 与托管客户端一起使用),因为每个 Web 应用程序都有自己的 Appdomain,因此也有自己的连接池。共享应用程序池会导致它们共享进程,但不共享应用程序域。
我以前曾以便宜的方式完成此操作,将 Apache 安装在与 IIS 相同的计算机上,仅侦听端口 443(尽管需要许多 IP/证书组合),然后将 Apache 设置为 IIS 上的反向代理同一台机器仅在端口 80 上侦听(但对于任何主机标头)。
Maintenance will be WAY easier if you only have one IIS site to manage. A more efficient way would be to deal with the SSL issue somewhere else (eg, hardware load balancer, content switch, Apache box, etc) and reverse-proxy to a single IIS instance with a single version of the app running. Sharing the app pools won't help (assuming you're using SQL Server with the managed client anyway), because each web app gets its own Appdomain and hence its own connection pool. Sharing app pools causes them to share a process, but not an appdomain.
I've done this on the cheap before by having Apache installed on the same machine as IIS, listening only on port 443 (for however many IP/cert combos were needed), then have Apache set up as a reverse proxy to IIS on the same machine listening only on port 80 (but for any host header).
我同意为同一个应用程序运行不同的网站是没有意义的。
您可以使用 IIS 管理器在网站中设置 SSL 端口。如果您没有将 IIS 设置为需要证书,则某些用户可以使用 HTTP 版本而不会出现证书错误,而其他用户则可以使用 SSL。
I agree it does not make sense to run different web sites for the same applicaiton.
You can set SSL port in the web site with IIS manager. If you do not set IIS to require certificates, some users can use the HTTP version without the certificate error and the others can use SSL.