How well will WCF scale to a large number of client users?

可紊 提交于 2019-11-30 17:12:40

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!