应用服务器如何支持多线程?
我正在寻找有关 Tomcat、Websphere、IIS 等应用程序服务器如何支持多线程来处理客户端请求的信息。是否对它们各自如何支持/处理并发请求进行比较分析?
谢谢
I am looking for information regarding how application servers like Tomcat, Websphere, IIS etc support multi-threading to handle client requests. Is there a comparative analysis on how each of them support/handle concurrent requests?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
IIS 也使用线程池。 Intel 在 Windows 和 Linux 上所做的工作(提供源代码)是一个很好的参考。 Microsoft 只是在 Windows 内核中做了同样的事情(完全相同的事情,包括原始默认值)。
这种方法的问题之一(排除实现缺陷)是(动态)线程池机制的开销:它应该随着需求而增长,但它的实现方式却违背了目的。
有关最佳可用(和经过验证的)模型的详细比较,请参阅:
www.wikivs.com/wiki/G-WAN_vs_Nginx
IIS is using threadpools too. A good reference is the work done by Intel (source code available) to do this on Windows and Linux. Microsoft just did the same thing in the Windows kernel (the very same thing, original defaults included).
One of the problems with this approach (implementation deffects excluded) is the overhead of the (dynamic) threadpool mechanism: it is supposed to grow with the demand but the way it does it defeats the purpose.
For a good comparison of the best available (and proven) models, see:
www.wikivs.com/wiki/G-WAN_vs_Nginx
您可以随时查看源代码以获取有关 Tomcat 的信息。与 Java 中的大多数多线程应用程序一样,它是围绕带有 Workers 的线程池构建的。不确定 Websphere,但我认为它与 Tomcats 类似。无法回答 IIS...
You can always look at the source for information about Tomcat. As most multi-threaded applications in Java it's built around a threadpool with Workers. Not sure about Websphere but I think it's simular to Tomcats. Can't answer for IIS...