Helidon is the fastest!

Dmitry Aleksandrov
Helidon
Published in
3 min readSep 1, 2023

In cloud IT infrastructure, time is money. Literally! Modern consumers pay for every second they use cloud infrastructure. Thus, the shorter start-up time the framework provides, the less money is spent, and the better economy is. Quite often, the services are stateless and should be able to start doing real work very soon.

But how to determine the start-up time to make the right benchmark? There are many ways to do it. There are a lot of articles on the web making and providing results of such measurements. And the measurements are performed in various ways. But most of them copy the numbers from the framework’s console output. Usually, an empty starter project is taken, launched, and the start-up time, traditionally written in the output, is taken as a measurement, which is good but a bit unfair.

Why is it unfair? Modern frameworks are usually very lazy. They tend to initialize and run their functionality on the first demand. This means that the framework may declare itself as “ready to serve,” but when the first request comes, it will initialize a bunch of stuff to actually perform this request. And this takes time. So, declaring a framework up and running does not mean it will immediately send a response.

So, it looks like measuring the time between the framework start and the first request served will give us a more accurate result for the “real” framework start-up time.

So, let’s do it for Helidon and Spring Boot.

For this, I have written a small Python script that starts an application with one endpoint, sends a request, and waits for the response. This time is measured. It does 10 iterations and the average time is taken.

The script is available here: https://github.com/dalexandrov/Compare

It was inspired by Rudy De Busscher’s investigation: https://www.atbash.be/2023/03/12/time-is-code-my-friend/

We often have a question: “Why should I choose Helidon instead of Spring Boot?” With this measurement, we prove that Helidon is faster and gives better performance. Thus, our customers save money. The savings in milliseconds can seem not very convincing, but at scale in the clouds, the economy is vast!

So let us look at the numbers (on my machine MackBook Pro, M1Max, 64 Gb RAM, Java 20, Ventura 13.5.1):

It is clear to see that Helidon is much faster. The Virtual threads-based Helidon 4 Web Server has the first response in 257 ms, which is just impressive! Even Helidon MP, with full CDI support, is faster than Spring Boot.

Let’s have a look also on memory consumption:

And at the disk space consumption:

It looks like Helidon outperforms Spring Boot not only with the start-up time but also in memory usage (RSS) and disk footprint. Since in the clouds we pay for these resources, it is also essential to take them into consideration when making the decision of which framework to use.

In conclusion, I can say that Helidon is definitely the best choice for a microservice framework. It always uses the most advanced and optimized Java features. With the introduction of the revolutionary Virtual threads-based Helidon 4 Web Server, the performance will grow even more!

You can also get acquainted with the TechEmpower Benchmark statistics about Helidon performance for the preliminary runs here:

To stay informed — follow our official Twitter, Mastodon, and Linked In for updates! If you have further questions, please use https://stackoverflow.com/tags/helidon.

--

--