The WCF Service may slow down under high load.

Source: Internet
Author: User

Kb2538826 explains the problem that occurs in the WCF Service in case of sudden requests: when your WCF Service receives sudden requests, the default value is.. net I/O completion port (iocp) thread pool may not be extended and your WCF response time will increase as soon as possible. This article WCF scales up slowly with bursts of work explains what happened.

The solution is to execute the WCF Service through another thread pool. Implementing this solution may produce a small amount of overhead. The performance test results for each WCF Service are different.

WCF listener Recommended Solution
HTTP sync module (default in 3.x)-used in integrated application pool Switch to the async handler and then apply the solution in this article or alternatively use a private threadpool (see links following this table)
HTTP aync module (default in 4.x)-used in integrated application pool Apply the code solution in this article
ISAPI-used in Classic mode application pool Apply private threadpool (see links following this table)
TCP. net Apply the code solution in this article

Note: when using the WCF listener, this solution does not prevent incoming threads from waiting for the code of the WCF Service.

If you follow the table above and cannot apply the solution in this article, use an example of a dedicated thread pool in the msdn article:
Synchronization contexts in WCF Juval Lowy synchronize environment http://msdn.microsoft.com/zh-cn/magazine/cc163321.aspx in WCF

To use an asynchronous HTTP handler, follow these steps:

1. the WCF adjustment threshold should be high enough to handle expected bursts at an acceptable response time.
2. if you use. net CLR default thread pool, staff or iocp for your WCF Service, you must ensure a minimum number, the number of threads you expect to execute concurrently (the value begins to limit the number of threads created ).
3. Execute the following code to execute your WCF Service in your service. Net CLR working thread pool.

 

Reusing cookies in different WCF Web Services

Less tweaking of your WCF 4.0 apps for high throughput workloads

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.