Tolga Evcimen
Tolga Evcimen

Reputation: 7352

WCF limitations for concurrent users

I am wondering if is there any user limit in numbers. I mean is there any upper limit for users that can use the WCF service concurrently other than memory limitations? I made a little research but since I don't know the terminology well I couldn't find anything :/ And I can't be sure of that kind of a limitation doesn't exist just because I couldn't find it :)

Upvotes: 0

Views: 297

Answers (1)

Cybermaxs
Cybermaxs

Reputation: 24558

To prevent overloading of a service, you can specify how many calls can be made and how many sessions or instances can be created. You can do this by configuring the ServiceThrottlingBehavior settings. We can also do this by configuring the serviceThrottling element in app.config. The following throttling properties can be set.

  • MaxConcurrentCalls : the max number of calls processed at ones by the service.
  • MaxConcurrentInstances :the max number of service instance objects executing at ones on the service.
  • MaxConcurrentSessions :the max number of sessions handled at ones by the service.

Here is a sample config :

<behaviors>
      <serviceBehaviors>
        <behavior  name="Throttled">
          <serviceThrottling 
            maxConcurrentCalls="1" 
            maxConcurrentSessions="1" 
            maxConcurrentInstances="1"
          />
          <serviceMetadata 
            httpGetEnabled="true" 
            httpGetUrl=""
          />
        </behavior>
      </serviceBehaviors>

Depending and your Framework version, the defaults values for all theses settings are not the same (link).

Upvotes: 1

Related Questions