Data comparison between rust's spring-rs and java's springboot
Posted 2024-09-04 05:19:42 ‐ 2 min read
The size of the release binary built with spring-rs is half of the SpringBoot jar package. Rust still have a lot of room for optimization.
The size of the Docker image built with spring-rs is 1/4 of the SpringBoot image. The rust docker image also has a lot of room for optimization.
The runtime memory usage of using spring-rs is 1/10 of that of SpringBoot.
The QPS of the simplest web application using spring-rs is twice that of SpringBoot.
The QPS of a web application with database queries using spring-rs is basically the same as SpringBoot.
The data query tool currently used is sqlx
. sqlx's performance support for MySQL is very poor, and the stress test results are only half of SpringBoot, so it is recommended to use PostgreSQL as the backend of sqlx.
Next, I will connect to rust-postgres to see if the performance will be improved compared to sqlx.
Detailed stress test code and related data can be found in this link