3

I am new to WCF. I have a WCF where many application using this service. And my requirement is, WCF service should handle multiple request at the same time. I know that this can be acheived by using [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)].

But I want to know what are the pros and cons of implementing Multiple option, as my service deals with payment processing. And I guess default ConcurrencyMode is Single. Can anyone please guide me by your suggestions?

As far as I surfed, everyone suggesting if we use ConcurrencyMode.Multiple, we are responsible for providing the necessary synchronization/thread safety. I am bit confused, what kind of issues may occur and what are the steps needed to overcome when using ConcurrencyMode.Multiple and InstanceContextMode.PerCall?

SharpC
  • 6,974
  • 4
  • 45
  • 40
Sudha
  • 505
  • 1
  • 10
  • 27

3 Answers3

1

ConcurrencyMode.Multiple can cause scalability issues and may cause threading issues as mentioned in the SO link - ConcurrencyMode.Multiple in stateless WCF services.

Community
  • 1
  • 1
Krishna
  • 636
  • 3
  • 8
0

I suggest you consider reviewing the following "Concurrency Management" excerpt from the “Programming WCF Services” book: http://msdn.microsoft.com/en-us/library/orm-9780596521301-02-08.aspx

Seymour
  • 7,043
  • 12
  • 44
  • 51