All Projects → smallnest → Jax Rs Performance Comparison

smallnest / Jax Rs Performance Comparison

Licence: apache-2.0
⚡️ Performance Comparison of Jax-RS implementations and embedded containers

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Jax Rs Performance Comparison

Pac4j
Security engine for Java (authentication, authorization, multi frameworks): OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 2,097 (+1058.56%)
Mutual labels:  jax-rs, vertx, dropwizard
Kvision
Object oriented web framework for Kotlin/JS
Stars: ✭ 658 (+263.54%)
Mutual labels:  spring-boot, vertx
Easyweb Jwt
基于 SpringBoot、jwt和JwtPermission实现的前后端分离开发框架,接口遵循RESTful风格。
Stars: ✭ 614 (+239.23%)
Mutual labels:  restful, spring-boot
Summer
Vertx router with JAX-RS
Stars: ✭ 54 (-70.17%)
Mutual labels:  jax-rs, vertx
helloworld-web
Hello World web application in 39 different ways in Java
Stars: ✭ 18 (-90.06%)
Mutual labels:  dropwizard, vertx
Hsweb Iot Cloud
本项目已迁移至 github.com/jetlinks
Stars: ✭ 258 (+42.54%)
Mutual labels:  spring-boot, vertx
Dropwizard
A damn simple library for building production-ready RESTful web services.
Stars: ✭ 8,078 (+4362.98%)
Mutual labels:  jax-rs, dropwizard
Resteasy Spring Boot
RESTEasy Spring Boot Starter
Stars: ✭ 190 (+4.97%)
Mutual labels:  jax-rs, spring-boot
Dorado
基于Netty4开发的简单、轻量级、高性能的的Http restful api server
Stars: ✭ 65 (-64.09%)
Mutual labels:  restful, spring-boot
Spring Boot Api Project Seed
🌱🚀一个基于Spring Boot & MyBatis的种子项目,用于快速构建中小型API、RESTful API项目~
Stars: ✭ 8,979 (+4860.77%)
Mutual labels:  restful, spring-boot
White Jotter
白卷是一款使用 Vue+Spring Boot 开发的前后端分离项目,附带全套开发教程。(A simple CMS developed by Spring Boot and Vue.js with development tutorials)
Stars: ✭ 1,838 (+915.47%)
Mutual labels:  restful, spring-boot
rest.vertx
A JAX-RS like annotation processor for vert.x verticals and more
Stars: ✭ 138 (-23.76%)
Mutual labels:  jax-rs, vertx
Tutorial
Spring Boot的例子,包含RESTful API, MVC, JMS, Cache, Mybatis, Cache, Websocket...
Stars: ✭ 215 (+18.78%)
Mutual labels:  restful, spring-boot
System Series
📚 服务端开发实践与工程架构,服务端基础篇 | 微服务与云原生篇 | Spring 篇 | Node.js 篇 | DevOps 篇 | 信息安全与渗透测试篇
Stars: ✭ 336 (+85.64%)
Mutual labels:  restful, spring-boot
Crnk Framework
JSON API library for Java
Stars: ✭ 234 (+29.28%)
Mutual labels:  jax-rs, spring-boot
Vertx Embedded Springboot
Vert.x embeded Springboot
Stars: ✭ 19 (-89.5%)
Mutual labels:  spring-boot, vertx
X Springboot
X-SpringBoot是一个轻量级的Java快速开发平台,能快速开发项目并交付【接私活利器】
Stars: ✭ 1,117 (+517.13%)
Mutual labels:  restful, spring-boot
Awesome Http Benchmark
HTTP(S) benchmark tools, testing/debugging, & restAPI (RESTful)
Stars: ✭ 2,236 (+1135.36%)
Mutual labels:  restful, benchmark
Hikaku
A library that tests if the implementation of a REST-API meets its specification.
Stars: ✭ 154 (-14.92%)
Mutual labels:  jax-rs, dropwizard
Spring Boot Shiro
Apache Shiro integration with Spring Boot.
Stars: ✭ 177 (-2.21%)
Mutual labels:  spring-boot

Jax-RS-Performance-Comparison

Performance Comparison of Jax-RS implementations and embedded containers

Build Status

Gajotres have written an article: Top 8 Java RESTful Micro Frameworks. He listed 8 best light weight Java RESTful framework. Personally, I perfer jax-rs implementations and micro frameworks for deploying applications as micro services and those micro services can be deployed in docker containers.

So I have test five Jax-RS implementations plus embedded containers despite business logics. The RESTful service is very simple and it only returns a "hello world" string. Remember, tests don't contain any business logics even JSON libraries. There are other articles to dicuss serialization framework. For example, my test

I have added more RESTful framework besides Jax-RS implementation, which contains:

  • Spring-boot
  • RESTEasy + Netty4
  • Native Netty
  • Vert.x
  • Go

You can check the test result and the performancre chart.

Compile applications

It is a multiple-module maven project. You can run "mvn package" in parent directory to packge each module. It generates a fat-jar in target directories of modules for each module. It is easy.

Test Environment

Server AWS C3.2xlarge

  • 8 cores (E5-2666 v3 @ 2.90GHz)
  • memory: 16G (only allocate 4G for restful applications)

Java 1.8.0_51

Test tool wrk the test cmd is like: wrk -t16 -c1000 -d30s http://127.0.0.1:8080/rest/hello. I use 16 threads and 100/200/500/1000 connnections to test each case.

Starting Server

java -Xmx4g -Xms4g -jar jersey-grizzly2-1.0-SNAPSHOT.jar
java -Xmx4g -Xms4g -jar jersey-jetty-1.0-SNAPSHOT.jar
java -Xmx4g -Xms4g -jar dropwizard-1.0-SNAPSHOT.jar hello.yml 
java -Xmx4g -Xms4g -jar resteasy-netty-1.0-SNAPSHOT.jar 
java -Xmx4g -Xms4g -jar resteasy-undertow-1.0-SNAPSHOT.jar
java -Xmx4g -Xms4g -jar springboot-1.0-SNAPSHOT.jar
java -Xmx4g -Xms4g -jar resteasy-netty4-1.0-SNAPSHOT.jar 
java -Xmx4g -Xms4g -jar nativenetty-1.0-SNAPSHOT.jar
java -Xmx4g -Xms4g -jar vertx-1.0-SNAPSHOT.jar
java -Xmx4g -Xms4g -jar swagger-light-java-1.0.0.jar

Test Result

Test data is here

Conclusion

It looks Resteasy is better than jersey whatever jersey uses grizzly2 or jetty container.

It is predictable that performance of dropwizard is same to jersey+jetty.

Resteasy is excellent in undertow and netty.

To my surprise is resteasy+undertow is a little better than resteasy+netty. Maybe they are all developed by JBoss and they have done some optimization.

I do not recommend you use spring boot in large projects because its performance and style.

Of course native netty is number one but my test has not contains a http router so maybe you can't say it is RESTful framework. But I like its perforamnce.

Performance of RESTEasy+netty4 is lower than what i expect. but RESTEasy+netty3 is very good.

One interesting framework is Vert.x. I like its functional programming style but its performance is not so good.

I have not monitored the CPU usage and memory usage. You can try it.

Update

  • 2015/11/19 add native go, go-restful codes
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].