如何在wcf中处理每秒200K的请求
我需要设计一个系统,能够在每台机器上通过 HTTP 处理每秒 200K 的请求。 wcf服务需要托管在win服务下。 不知道wcf能不能满足这样的需求? 最佳系统设置/最佳配置是什么?
机器本身相当重,有 32G RAM 和 8 核(或更多),并且可以根据需要进行升级
我可以使用 http 在每台机器上使用 wcf 处理如此大量的请求吗?
I need to design a system that can handle 200K request per second in each machine over HTTP.
The wcf service need to be hosted under win service.
I wonder if wcf can handle such a requirement?
What is the best system setup/ best configuration?
The machine itself is pretty heavy 32G RAM and 8 core (or more), and can be upgraded if needed
Can I handle such amount of request in each single machine with wcf using http?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在一台机器上执行此操作可能非常困难(如果确实可能的话)。最好使您的系统水平扩展,这样您就可以根据需要添加大量机器。如何做到这一点取决于您的系统实际需要做什么。如果它是一些不需要持久状态的简单计算,那么它应该不会太难。如果您与某种形式的存储进行了一些交互,而这些形式确实需要在每个请求上进行读/写,那么这将变得更加困难 - 并且选择持久性技术可能是使其全部结合在一起的关键。
请注意,水平扩展还有其他好处 - 特别是能够在不停机的情况下升级系统(如果您小心的话),并消除巨大的单点故障。
Doing this on a single machine is likely to be pretty tough (if indeed it's possible). It would be better to make your system scale horizontally, so you can add lots of machines as required. How you do that will depend on what your system actually needs to do. If it's some simple calculation which requires no persisted state, it shouldn't be too hard. If you've got some interaction with storage of some form which really needs to be read/written on each request, it'll be a lot harder - and choosing your persistence technology is likely to be pretty key to making it all hang together.
Note that there are other benefits to scaling horizontally too - in particular, the ability to upgrade the system without any downtime (if you're careful) and removing a huge single point of failure.
您需要提供更多有关此的信息。
您是否收到请求并必须立即处理?
您可以存储请求数据并将处理委托给其他线程/进程吗?有什么方法可以扩展系统而不是向上扩展系统吗?
这实际上是您可以部署内容的唯一基础设施吗?
我首先会问在请求处理过程中我想做什么。那么瓶颈将会是什么。
You need to give some more info on this.
Do you get the request and have to process it immediately?
Can you store the request data and delegate the processing to some other thread/process? Is there any way to scale the system out instead of up?
Is this in fact the only piece of infrastructure you can deploy stuff to?
I would start by asking what is it that I want to do during request handling. then what the bottlenecks are going to be.