views:

1474

answers:

4

Does anyone have any experience with how well services build with Microsoft's WCF will scale to a large number of users?

The level I'm thinking of is in the region of 1000+ client users connecting to a collection of services providing the business logic for our application, and these talking to a database, in something akin to a traditional 3-tier architecture.

Are there any particular gotchas that have slowed down performance, or any design lessons learnt that have enabled this level of scalability?

+8  A: 

To ensure your WCF application can scale to the desired level I think you might need to tweak your thinking about the stats your services have to meet.

You mention servicing "1000+ client users" but to gauge if your services can perform at that level you'll also need to have some estimated usage figures, which will help you calculate some simpler stats such as the number of requests per second your app needs to handle.

Having just finished working on a WCF project we managed to get 400 requests per second on our test hardware, which combined with our expected usage pattern of each user making 300 requests a day indicated we could handle an average of 100,000 users a day (assuming a flat usage graph across the day).

In addition, since it's fairly common to make the WCF service code stateless, it's pretty easy to scale out the actual WCF code by adding additional boxes, which means the overall performance of your system is much more likely to be limited by your business logic and persistence layer than it is by WCF.

Ubiguchi
+2  A: 

Probably the 4 biggest things you can start looking at first (besides just having good service code) are items related to:

  • Bindings - some binding and they protocols they run on are just faster than others, tcp is going to be faster than any of the http bindings
  • Instance Mode - this determines how your classes are allocated against the session callers
  • One & Two Way Operations - if a response isn't needed back to the client, then do one-way
  • Throttling - Max Sessions / Concurant Calls and Instances

They did design WCF to be secure by default so the defaults are very limiting.

MotoWilliams