在spring boot里使用undertow而非tomcat
参考https://examples.javacodegeeks.com/enterprise-java/spring/tomcat-vs-jetty-vs-undertow-comparison-of-spring-boot-embedded-servlet-containers/做了一个性能测试,用于web服务器选型。
使用jmeter简单测试了一下,结论先行:性能:undertow>tomcat>jetty
调用同样的接口,分别对三种web服务器做测试
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>--> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
</dependencies>
1. spring-web默认使用tomcat时,吞吐率如下:

2. spring-web使用undertow时,吞吐率如下:

3. spring-web使用jetty时,吞吐率如下:

在spring boot里使用undertow而非tomcat的更多相关文章
- Spring Boot 容器选择 Undertow 而不是 Tomcat
Spring Boot 内嵌容器Undertow参数设置 配置项: # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程 # 不要设置过大,如果过大,启动 ...
- Spring Boot 容器选择 Undertow 而不是 Tomcat Spring Boot 内嵌容器Unde
Spring Boot 内嵌容器Undertow参数设置 配置项: # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程 # 不要设置过大,如果过大,启动 ...
- Jrebel热部署配置完整教程(IntelliJ IDEA、Jrebel、spring boot、springboot、eclipse、Tomcat)
标签:IntelliJ IDEA.Jrebel.spring boot.springboot.eclipse.Tomcat1.安装插件并激活插件安装参考:http://blog.csdn.net/u0 ...
- Spring Boot: Tuning your Undertow application for throughput--转
原文地址:https://jmnarloch.wordpress.com/2016/04/26/spring-boot-tuning-your-undertow-application-for-thr ...
- 如何把kotlin+spring boot开发的项目部署在tomcat上
本文只讲部署过程,你首先要保证你的程序能在IDE里跑起来: 先看看你的application.properties中设置的端口号与你服务器上tomcat的端口号是否一致 server.port=80 ...
- 精尽Spring Boot源码分析 - 内嵌Tomcat容器的实现
该系列文章是笔者在学习 Spring Boot 过程中总结下来的,里面涉及到相关源码,可能对读者不太友好,请结合我的源码注释 Spring Boot 源码分析 GitHub 地址 进行阅读 Sprin ...
- spring boot 在什么时候启动的tomcat
我一直很好奇 spring boot 以哪种方式 启动的 tomcat 今天 特地跟踪了一下 大家都知道 spring 容器很核心的 方式 是org.springframework.context. ...
- Spring Boot中以代码方式配置Tomcat
在Spring Boot2.0以上配置嵌入式Servlet容器时EmbeddedServletContainerCustomizer类不存在,经网络查询发现被WebServerFactoryCusto ...
- 如何在使用spring boot的时候,去掉使用tomcat
在spring boot中引入spring-boot-starter-web依赖的时候,不想使用spring boot提供的tomcat怎么办呢? 如下配置则可以解决问题: <dependenc ...
随机推荐
- python中字典的建立
一.字典由键key与值value构成. 如: a={'d':6,'f':'va'}print(a['f']) 上面代码简单建立字典,其中需要访问字典需要输入键值. 二.又比如需要在某个关键字中添加数据 ...
- jquery实现简单定时轮播图
JS $(document).ready(function(){ var index = 0; //刚开始设置一个index,index为图片的索引值 $(".pictureDemo img ...
- Java自学-操作符 关系操作符
Java的关系操作符 关系操作符:比较两个变量之间的关系 > 大于 >= 大于或等于 < 小于 <= 小于或等于 == 是否相等 != 是否不等 示例: public clas ...
- net start mysql 失败提示“NET HELPMSG 3534”
lz使用的window系统8.0.16版本的mysql,以下四步解决如上问题: 1. mysqld -remove 2. mysqld --initialize 3.mysqld -install(m ...
- MongoDB配置文件及添加用户
一.参数启动mongodb $ mongod --bind_ip=0.0.0.0 二.配置文件: mongod.conf # 后台运行 fork=true # 数据存储文件目录 dbpath=/roo ...
- 关于mybaits的注解@Param
一.含义 @param作为dao层的注解,为了解决多个参数时,参数类型不一致的问题. <select id="findEmpById" resultType="co ...
- Prometheus学习笔记(5)Grafana可视化展示
目录 一.Grafana安装和启动 二.配置数据源 三.配置dashboard 四.配置grafana告警 一.Grafana安装和启动 Grafana支持查询Prometheus.从Grafana ...
- 在linux系统中如何通过shell脚本批量设置redis键值对
业务逻辑:批量设置redis中手机号的验证码为888888: 准备shell脚本如下:将18888888100~18888888110的手机号验证码设置为888888: #!/bin/bash ;i& ...
- IEnumerable,ICollection ,
一般规定——IEnumerable < >(MSDN:http://msdn.microsoft.com/en-us/library/system.collections.ienumera ...
- Css背景设置 、
每天进步一小步,一年进步一大步. 第一次发博客园文章,主要记录自己学习的一个过程. CSS3 背景 CSS3 包含多个新的背景属性,它们提供了对背景更强大的控制. background-size ba ...