Click here to Skip to main content
15,884,353 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.

Thanks
Sebastian
Posted

1 solution

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

Instancing
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
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.

Throttling
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:
http://msdn.microsoft.com/en-us/library/ms731193(v=vs.110).aspx
http://msdn.microsoft.com/en-us/library/ms735114(v=vs.110).aspx
 
Share this answer
 
v2

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