Java Servlet 容器性能如何? [英] Java Servlet container performance?

查看:37
本文介绍了Java Servlet 容器性能如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在这里向 Java 专业人士提出一个关于我即将进行的研究的问题 - 导致各种 servlet 容器效率差异的关键因素是什么?我需要比较 Tomcat/JBoss/Glassfish/Jetty 等,我需要知道哪些因素"可能以最显着的方式影响结果?我将为此目的编写模拟应用程序,因此我可能会在那里实现对 Java 功能/框架/库等的任何建议,以便我可以大大增加容器的负载(实际上是容器,我不关心机器的负载,因为我当然要在同一台机器上运行所有测试),将不胜感激!我需要研究尽可能客观.感谢大家的帮助!

I'd like to ask the Java pros here a question about my current study that I am about to do - what are the key contributors to the differences in efficiency of various servlet containers? I need to compare Tomcat/JBoss/Glassfish/Jetty etc. and I need to know what "factors" may affect the results in the most significant way? I am going to write mock applications for that purpose, so any recommendation for a Java feature/framework/library etc. that I might implement there so that I can greatly increase the load of the containers (actually the containers, I do not care about the load of the machine since I am going to run all the tests on the same machine of course), would be appreciated! I need the study to be as objective as possible. Thanks for any help guys!

推荐答案

一些可能对 Web 容器造成负担的事情(当然,除了大量请求之外):

Some things that could tax a web container (apart from lots of requests, of course):

  • 使用小堆(例如只有 128 或 256 MB)
  • 钝化会话(每个会话中都有大型可序列化对象,太大而无法将所有对象都保存在内存中)
  • 提供静态资源(很多小资源,或者一些大资源)
  • 失败的请求(404 或服务器错误)
  • 包含许多其他 JSP 的 JSP
  • 大量不同的 JSP
  • 大量不同的 servlet 映射
  • 大量链式 servlet 过滤器
  • 大量单独的应用程序
  • 重新部署应用程序(确保应用程序本身没有类加载器泄漏)

这篇关于Java Servlet 容器性能如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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