Spring Boot 内嵌容器Undertow与tomcat吞吐量对比

测试工具jmeter:

Tomcat:

500
1000

1500

Undertow:

500
1000
1500

tomcat切换undertow方法

排除内置tomcat

<exclusions>
        <exclusion>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
        </exclusion>
</exclusions>

Add Undertow:

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-undertow</artifactId>
</dependency>

Undertow uses around 90MB and has ~13 threads:

结果:Springboot如果选用内置容器,建议使用Undertow。

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐