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

前端 未结 3 784
没有蜡笔的小新
没有蜡笔的小新 2021-01-03 23:49

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

The level I\'m thinking of is in the re

相关标签:
3条回答
  • 2021-01-04 00:17

    WCF configuration default limits, concurrency and scalability

    0 讨论(0)
  • 2021-01-04 00:36

    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.

    0 讨论(0)
  • 2021-01-04 00:41

    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.

    0 讨论(0)
提交回复
热议问题