Tomcat,Undertow和Webflux的Spring Boot性能基准测试

本文通过基准测试比较了Spring Boot中Tomcat、Undertow和Webflux的性能。测试应用由JHipster生成,包含启动时间、运行时性能测试。结果显示Undertow在启动速度和处理负载方面表现出色,Webflux有1%的请求失败,但平均吞吐量与Undertow相当。Tomcat的表现稍逊一筹,有5%的请求失败。
摘要由CSDN通过智能技术生成

Tomcat vs Undertow vs Webflux

ĴHipster is used by thousands of people to generate production-ready Spring Boot applications. We've been using Undertow for years, with great success, but as we are planning for JHipster 7 we started discussing migrating away from Undertow.

这种讨论在JHipster社区中经常发生:在这么多人的参与下,我们经常测试并尝试替代当前方法。

我们最后讨论了3种不同的应用程序服务器:

  • 来自Red Hat / IBM的Undertow:它以轻量级而著称,我们拥有多年的(良好)经验。Tomcat,来自Apache软件基金会:到目前为止,最受欢迎的选择。 这也是Spring Boot附带的默认解决方案。来自VMWare的Webflux:这实际上不是应用程序服务器,这是运行在Netty之上的Spring Webflux。 这意味着使用反应性API,该API应该提供更好的性能和可伸缩性。 这是一种完全不同的方法,JHipster也支持这种方法。

The test applications

I created a performance benchmarks GitHub repository, with applications generated by JHipster.

这些应用程序比用Spring Boot创建的简单的“ hello,world”应用程序更为复杂和现实。 例如,它们使用Spring Security和Spring Boot Actuator:这些库将影响应用程序的启动时间和性能,但是它们是您在现实世界中使用的库。

然后,它们并不像可能的那么复杂:我没有配置数据库或应用程序缓存。 这些会使运行性能测试变得更加复杂,并且不会增加任何特定的值:由于我们将对所有三个应用程序服务器使用相同的驱动程序或缓存解决方案,因此最终将测试相同的东西。

In the GitHub repository, you will find 4 directories: one for each application, and one with the performance tests.

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值