Click here to Skip to main content
15,614,138 members
Please Sign up or sign in to vote.
3.40/5 (2 votes)
See more:
Hi All,

Here I am seeking some clarification in the working WCF rest services.
1) How many concurrent request a REST service can handle?
2) Does TimeOut have any dependency on this?
3) How do we implement cache in REST for the connections it make;(For Eg. REST service is making a connection to a windows object , say Windows 8, to query something; How I can keep this connection in cache)?

It would be great, if you can provide some piece of information.


1 solution

Given the broad nature of your question(s), I think you may need to look into a few aspects of WCF services:

The instancing behavior (set by using the ServiceBehaviorAttribute.InstanceContextMode property) controls how the InstanceContext is created in response to incoming messages. By default, each InstanceContext is associated with one user-defined service object, so (in the default case) setting the InstanceContextMode property also controls the instancing of user-defined service objects.

Concurrency is the control of the number of threads active in an InstanceContext at any one time. This is controlled by using theServiceBehaviorAttribute.ConcurrencyMode with the ConcurrencyMode enumeration.

The ServiceThrottlingBehavior class exposes properties that you can use to limit how many instances or sessions are created at the application level. Using this behavior, you can fine-tune the performance of your WCF application. Use the MaxConcurrentCalls property to specify the maximum number of messages actively processing across a ServiceHost class, and the MaxConcurrentInstances property to specify the maximum number of InstanceContext objects in the service.

The following links provide valuable reference:
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900