응용 프로그램의 메모리 부족 현상이 발생하지 않도록 다양한 처리량 설정을 제어
하려면 ServiceThrottlingBehavior 클래스를 사용합니다.
MaxConcurrentCalls 속성은 ServiceHost에서 현재 처리되는 메시지 수를 제한합니다.
MaxConcurrentInstances 속성은 ServiceHost에서 한 번에 실행하는 InstanceContext 개체 수를 제한합니다.
MaxConcurrentSessions 속성은 ServiceHost 개체에서 수락할 수 있는 세션 수를 제한합니다.
런타임 부하 분산 기능을 사용하려면 응용 프로그램 실행 경험이 필요하므로, 응용 프로그램 구성 파일을 통해 ServiceThrottlingBehavior를 사용하는 것이 서비스 성능을 극대화하도록 실행을 수정하는 가장 일반적인 방법입니다
<configuration> <appSettings> <!-- use appSetting to configure base address provided by host --> <add key="baseAddress" value="http://localhost:8080/ServiceMetadata" /> </appSettings> <system.serviceModel> <services> <service name="Microsoft.WCF.Documentation.SampleService" behaviorConfiguration="Throttled" > <host> <baseAddresses> <add baseAddress="http://localhost:8080/SampleService"/> </baseAddresses> </host> <endpoint address="" binding="wsHttpBinding" contract="Microsoft.WCF.Documentation.ISampleService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> <behaviors> <serviceBehaviors> <behavior name="Throttled"> <serviceThrottling maxConcurrentCalls="1" maxConcurrentSessions="1" maxConcurrentInstances="1" /> <serviceMetadata httpGetEnabled="true" httpGetUrl="" /> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> </configuration>
'C#.NET 웹서비스' 카테고리의 다른 글
WCF DataService IIS 실행 (세팅) 안될때 확인 해볼 사항 (0) | 2011.01.25 |
---|---|
WCF Data Services 퀵 스타트 // IIS Data Services 세팅 (0) | 2011.01.25 |
[MSDN]How to: Add, Modify, and Delete Entities (WCF Data Services) (0) | 2010.10.25 |
MSDN [WCF Data Services/DataSvcUtil.exe ]수동으로 클라이언트 데이터 서비스 클래스 생성 (0) | 2010.10.20 |
메시지를 역직렬화하는 동안 포맷터에서 예외가 발생했습니다. (0) | 2010.07.22 |
Duplex Services 참고 사이트 (0) | 2010.03.15 |
[MSDN] WCF단방향 호출, 콜백 및 이벤트에 대해 알아야 할 점 (0) | 2010.03.15 |
WCF 주고받는데이터 정하기 (0) | 2010.02.23 |
윈도우즈 서비스 등록방법 (2) | 2009.12.24 |
[MSDN]WCF 서비스호스팅 (0) | 2009.12.23 |