WCF 对大量客户端用户的扩展能力如何? [英] How well will WCF scale to a large number of client users?

查看:43
本文介绍了WCF 对大量客户端用户的扩展能力如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道使用 Microsoft 的 WCF 构建的 Web 服务将如何扩展到大量用户?

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

我想到的级别是 1000 多个客户端用户连接到为我们的应用程序提供业务逻辑的 WCF 服务集合,这些服务与数据库对话 - 类似于传统的 3 层架构.

The level I'm thinking of is in the region of 1000+ client users connecting to a collection of WCF services providing the business logic for our application, and these talking to a database - similar 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?

推荐答案

为了确保您的 WCF 应用程序可以扩展到所需的级别,我认为您可能需要调整您对服务必须满足的统计数据的看法.

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.

您提到为1000 多个客户端用户"提供服务,但要衡量您的服务是否可以在该级别执行,您还需要一些估计的使用数据,这将帮助您计算一些更简单的统计数据,例如每个请求的数量第二个您的应用需要处理.

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.

刚刚完成 WCF 项目的工作,我们设法在测试硬件上每秒收到 400 个请求,结合我们预期的每个用户每天发出 300 个请求的使用模式,这表明我们平均每天可以处理 100,000 个用户(假设全天的使用情况图平坦).

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).

此外,由于使 WCF 服务代码无状态是相当普遍的,因此通过添加额外的框来扩展实际的 WCF 代码非常容易,这意味着您的系统的整体性能更有可能受到您的限制业务逻辑和持久层不是 WCF.

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.

这篇关于WCF 对大量客户端用户的扩展能力如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆