简体   繁体   English

为SOA Web应用程序托管WCF服务的最佳方式

[英]Best way to host WCF services for SOA web application

I'm developing a website which attempts to utilize the SOA pattern. 我正在开发一个试图利用SOA模式的网站。 The services service both the main web app as well as an HTML5 mobile app and native iPhone and Android apps through the use of a facade service to provide a simplified API. 该服务通过使用外观服务提供简化的API,为主要Web应用程序以及HTML5移动应用程序和本机iPhone和Android应用程序提供服务。

The web app uses the Castle WCF Facility to connect to the services using basicHttpBinding. Web应用程序使用Castle WCF Facility使用basicHttpBinding连接到服务。

I am finding performance slow. 我觉得性能很慢。 Especially if the site hasn't been hit for over half an hour. 特别是如果该网站没有被击中超过半小时。 To remedy this I have changed the app pool recycling strategy to recycle after the app pool hits x% of the servers RAM. 为了解决这个问题,我已经将应用程序池回收策略更改为在应用程序池达到x%的服务器RAM之后进行回收。

My question is - what is the best way to host services in a setup like this? 我的问题是 - 在这样的设置中托管服务的最佳方式是什么? What is the best binding to use? 什么是最好的绑定使用? Should I consider moving the services out of IIS altogether? 我是否应该考虑将服务从IIS中移出? I understand net.tcp is the fastest binding to use - would it be best to host the services as windows services using that? 我知道net.tcp是最快的绑定使用 - 最好是使用它来托管服务作为Windows服务吗?

Cheers 干杯

w:// 女://

To pick a few points: 选择几点:

host the services as windows services 将服务作为Windows服务托管

That looses all the monitoring and managing facilities that IIS offers. 这会丢失IIS提供的所有监视和管理功能。 Only an option when your code is 100% perfect in error handling and resource management. 当您的代码在错误处理和资源管理方面100%完美时,只有一个选项。

[that] net.tcp is the fastest binding [that] net.tcp是最快的绑定

For a local LAN, behind the firewall that might be a good option. 对于本地LAN,防火墙后面可能是一个不错的选择。 Note that on 1 Server, namedPipe is even faster. 请注意,在1 Server上,namedPipe甚至更快。

You should be able to configure a 2nd endpoint on your services for internal use. 您应该能够在服务上配置第二个端点以供内部使用。 But I would stay with IIS. 但我会继续使用IIS。 On all but the latest version you'll need WAS 除了最新版本之外,您还需要WAS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM