DCSIMG
WCF Service Throttling - Zuker On Foundations

Zuker On Foundations

The realm of .NET (WPF, WCF and all around)
WCF Service Throttling

Throttling is an important behavior of your WCF service that you should be addressing before publishing your service to clients.

The throttling behavior holds the configuration for 3 limitations that control the amount of resources that your service hosting can allocate to deal with client requests, thus enables you to manage the resource usage and balance the performance load.

It is crucial that you set the behavior appropriately because the default limitations of this service behavior is considered to be quite low.
The reason for such default values was for blocking DOS (Denial of Service) attacks on your service. However, most of the services we build are on-premises services within our enterprise, it is more appropriate to support more clients rather than block malicious attacks of some kind. (The general purpose is to find the right balance between the two, yet, it usually isn’t as the default values are)

Why am I blogging about it just now?
Well, one of the rather unknown changes made in WCF 4.0 is the change of the service throttling behavior default values.

Microsoft realized that the prior default values weren’t practical and were seldom applied that way.

The following summarizes the throttling behavior elements and their default value setting.
You should note that "ProcessorCount" indicates the number of CPU processors at the machine.

  1. MaxConcurrentCalls
  2. Defines the total number of concurrent calls that the service will accept.

    Prior to .NET 4.0 the default value is 16, whereas in .NET 4.0 the default value is 16 * ProcessorCount.

    In practice, The amount of calls your service will actually handle depends on the concurrency mode your service is configured with.

  3. MaxConcurrentSessions
  4. Defines the total number of sessionful channels that the service will accept.

    Prior to .NET 4.0 the default value is 10, whereas in .NET 4.0 the default value is 100 * ProcessorCount.

    This setting affects only sessionful channels where a session is represented by each proxy created by the client.

    If a client calls through a sessionful channel which needs to be created and the limitation is exceeded, the request will be queued.

  5. MaxConcurrentInstances
  6. Defines the total number service instances that will be created for servicing requests.

    Prior to .NET 4.0 the default value is 26, whereas in .NET 4.0 the default value is 116 * ProcessorCount. (the sum of the previous two)

    In practice, the amount of service instances that will actually be created depends on the instance context mode your service is configured with.

    If your service is configured as per-session, the maximum number of instances and sessions will be the minimum value between the MaxConcurrencySessions and MaxConcurrancyInstances.

    If your service is configured as per-call, the setting limits the number of active service instances. If exceeded, new requests will be queued.

    If your service is configured as single, this setting is ignored.

Finally, WCF 4.0 has surely made the default values a bit more practical. In spite of that, I still recommend paying a visit to that behavior and set it differently if needed.

Published Sunday, March 21, 2010 4:05 PM by Amir Zuker

תגים:,

Comments

# Were Michael Jackson's childrens face revealed for the first time today during the memorial service? |@ Monday, March 22, 2010 3:28 AM

Pingback from  Were Michael Jackson's childrens face revealed for the first time today during the memorial service? |

Were Michael Jackson's childrens face revealed for the first time today during the memorial service? |

# Toronto Town Car Mehlville Limo, Map Watertown South Dakota - 119.eumreborn.com@ Sunday, May 23, 2010 8:11 AM

Pingback from  Toronto Town Car Mehlville Limo, Map Watertown South Dakota - 119.eumreborn.com

Toronto Town Car Mehlville Limo, Map Watertown South Dakota - 119.eumreborn.com

# Driver Sony Cyber Shot Dsc W300, W300 Pickup Part Ram 1500 Models - 36.codebluehacks.org@ Sunday, May 23, 2010 9:29 PM

Pingback from  Driver Sony Cyber Shot Dsc W300, W300 Pickup Part Ram 1500 Models - 36.codebluehacks.org

Driver Sony Cyber Shot Dsc W300, W300 Pickup Part Ram 1500 Models - 36.codebluehacks.org

# Used Acid Rebuilt Engine Chevrolet Chevy P10 Van, P10 P2500 Van Headlight Switch - 116.animejin.com@ Monday, May 24, 2010 3:06 PM

Pingback from  Used Acid Rebuilt Engine Chevrolet Chevy P10 Van, P10 P2500 Van Headlight Switch - 116.animejin.com

Used Acid Rebuilt Engine Chevrolet Chevy P10 Van, P10 P2500 Van Headlight Switch - 116.animejin.com

# Spectra5 Part Directly 2006 Kia, Spectra5 Concert - 484.tgrconversions.com@ Monday, May 24, 2010 3:44 PM

Pingback from  Spectra5 Part Directly 2006 Kia, Spectra5 Concert - 484.tgrconversions.com

Spectra5 Part Directly 2006 Kia, Spectra5 Concert - 484.tgrconversions.com

# Power Rangers Operation Overdrive Battlefleet Megazord, Suunto Mc 2g Silva Ranger - 142.luna-atra.net@ Tuesday, May 25, 2010 1:03 AM

Pingback from  Power Rangers Operation Overdrive Battlefleet Megazord, Suunto Mc 2g Silva Ranger - 142.luna-atra.net

Power Rangers Operation Overdrive Battlefleet Megazord, Suunto Mc 2g Silva Ranger - 142.luna-atra.net

# 2005 - 2002 @ 2007 Denali Headlight Yukon Xl Gmc Savana, 2003 Gmc Sierra 1500 Hd Yukon Denali Xl - 151.unlockiphone30.net@ Thursday, May 27, 2010 3:05 PM

Pingback from  2005 - 2002 @ 2007 Denali Headlight Yukon Xl Gmc Savana, 2003 Gmc Sierra 1500 Hd Yukon Denali Xl - 151.unlockiphone30.net

2005 - 2002 @ 2007 Denali Headlight Yukon Xl Gmc Savana, 2003 Gmc Sierra 1500 Hd Yukon Denali Xl - 151.unlockiphone30.net

# 2000 - 1991 @ 1994 Chevrolet K2500 For Sale, Y12 K2500 Suburban Headlight Salvage Yards - 446.luna-atra.net@ Thursday, May 27, 2010 3:36 PM

Pingback from  2000 - 1991 @ 1994 Chevrolet K2500 For Sale, Y12 K2500 Suburban Headlight Salvage Yards - 446.luna-atra.net

2000 - 1991 @ 1994 Chevrolet K2500 For Sale, Y12 K2500 Suburban Headlight Salvage Yards - 446.luna-atra.net

# 1999 - 1998 @ Music Spectrum Analyzer, Spectrum Heater Discount Chevrolet - 452.jordanbrandallamerican.com@ Monday, May 31, 2010 5:17 AM

Pingback from  1999 - 1998 @ Music Spectrum Analyzer, Spectrum Heater Discount Chevrolet - 452.jordanbrandallamerican.com

1999 - 1998 @ Music Spectrum Analyzer, Spectrum Heater Discount Chevrolet - 452.jordanbrandallamerican.com

# 1981 - 2007 @ 1981 Plymouth Horizon Parts, Plymouth Horizon Bulb Promo - 282.renters.ws@ Monday, May 31, 2010 9:14 PM

Pingback from  1981 - 2007 @ 1981 Plymouth Horizon Parts, Plymouth Horizon Bulb Promo - 282.renters.ws

1981 - 2007 @ 1981 Plymouth Horizon Parts, Plymouth Horizon Bulb Promo - 282.renters.ws

# re: WCF Service Throttling@ Friday, February 25, 2011 11:50 PM

Itayram2|mustп»ї read this. once u have started there is no turning back.п»ї a little 10 year oldп»ї girl was raped and murderded in 1945. her body wasп»ї not found until 1947. then a boy lastп»ї week read this and did not copy and paste this message.п»ї the deadп»ї girl appeared in his room haunting him and killed him. ifп»ї you do not copy andп»їп»ї paste thisп»їп»ї onto 10 vidoes inп»ї 30 minutes the dead girlп»ї will apear in your roomп»ї tonight and hauntп»їп»ї youп»ї and kill you. wellп»ї you better start to copy and paste to beп»ї saved

 rxmexicostock.com

thplousaqq

ToratordDrale

# re: WCF Service Throttling@ Saturday, February 26, 2011 12:19 AM

BTRNAYA17|omq thatп»ї was hilarious ! he was liike... she thinks she s top doq here she is not top doq ! quess whatt you know what i am top doqq ! lolx ! loser loser !

 generichealths.com

thplousaqq

ToratordDrale

# Article Directory Blog » Are You Questioning Your Decision To Start A Home Based Business You Should@ Thursday, July 21, 2011 1:54 PM

Pingback from  Article Directory Blog » Are You Questioning Your Decision To Start A Home Based Business You Should

Article Directory Blog » Are You Questioning Your Decision To Start A Home Based Business You Should

# re: WCF Service Throttling@ Saturday, May 19, 2012 8:51 AM

LimosRentalsToronto provides high class facilities in Oshawa Wedding Limo,Georgetown Limos,Hamilton Wedding Limos.Scarborough Wedding Limo,East York Wedding Limo are also best choice.

<a href="www.lavishlimo.ca/">Pickering Limo</a>

allensolay@ymail.com

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: