1

I am trying to throttle maximum concurrent calls to my WCF service. I am limiting them as follows:

<behaviors>
      <serviceBehaviors>
        <behavior  name="Throttled">
          <serviceThrottling
            maxConcurrentCalls="4"
          />
        </behavior>
      </serviceBehaviors>
</behaviors>

My question is as follows:

  1. What happens if there are extra request than that set in "maxConcurrentCalls"? Will they be queued up or rejected?

  2. Will the user gets any error/exception as maxconcurrent call is reached?

  3. I want additional request to be queued and the user should not get any error or exception. What should be done for that?

1 Answers1

1

The throttled is designed to avoid excessive allocation and use of resources. When Throttle settings are enabled, if the current-limiting settings are exceeded, the WCF automatically puts the caller into the wait queue and then processes the calls in turn. If the client time out during the waiting period. You will get TimeoutException. In short, Throttle is designed to prevent system crashes, but only when high loads take up a small part of the load. If you're in a high load state for a long time and Throttle eventually causes all callers to timeout, it's recommended to consider the design at the outset

WCF Service Throttling

https://blogs.msdn.microsoft.com/wenlong/2009/07/26/wcf-4-higher-default-throttling-settings-for-wcf-services/

Abraham Qian
  • 7,117
  • 1
  • 8
  • 22