
Quarkus is a Java framework created by Red Hat with a focus on cloud-based environments, specifically Kubernetes and serverless. Furthermore, the framework strives to offer the best possible development experience by adopting standards, integrating with them, and configuring them easily.
Kubernetes-native
Quarkus incorporates fundamental elements for development and deployment in Kubernetes such as metrics, traces, health status reports, debugging on machines hosted in a remote cluster and configurations based directly on Kubernetes ConfigMaps .
Additionally, with the installation of an extension, Quarkus is able to generate all the artifacts and configurations necessary to deploy and update versions of a service in a Kubernetes cluster.
Reduced resource consumption and initialization time
Initialization time and resource consumption are two highly relevant aspects in cloud-based environments. Reducing these factors enables rapid scaling, cost reduction in systems with resource-based billing, rapid response times for as-a-service functions, and efficiency in systems with a large number of simultaneously running services.
To achieve this, Quarkus performs as many processes as possible at compile time, such as configuration analysis, classpath resolution, class loading, etc. This preprocessing results in a more optimized executable , with reduced startup time and resource usage compared to other frameworks that perform these actions at runtime, such as Spring.
Native builds with GraalVM
Native compilations can further reduce initialization time and resource consumption by creating an artifact executable by the operating system , without the requirement of a Java virtual machine.
Quarkus offers the ability to perform native compilations easily, without the need to install libraries or perform additional configuration. To perform a native compilation, simply run the “ quarkus:build ” goal with the “ native ” profile enabled.
Additionally, it is possible to perform the compilation itself in a Docker container, with the option “ -Dquarkus.native.container-build=true ”, allowing a compilation to be performed without having to configure the environment.

Example of command used to perform a native compilation
Extensions
Quarkus has a broad ecosystem of extensions, with a standardized configuration, that allow you to integrate various services and libraries, such as clients for identity providers like Keycloak , development of functions as a service in the AWS cloud with Lambda , configuration management in Azure , etc.
These extensions facilitate the integration, configuration and maintenance of supported services and libraries.
Standards-based
Adopting existing industry standards is one of the key aspects of Quarkus, leveraging existing tools and knowledge.
Using standards minimizes the learning curve and adoption time for developers with prior experience with these standards.

Comparison of resource consumption during initialization.
Quarkus adopts the following standards:
- Java EE (Jakarta) : REST service definition, persistence, batch jobs, dependency injection, validations, JSON mapping, and batch jobs.
- Microprofile : Environment configurations, authentication, endpoint documentation, telemetry, fault tolerance, and inter-service communications.
- OpenTelemetry : Traceability and metrics collection.
Dev services
Quarkus automatically configures and provisions local services for development, in the form of containers, fully preconfigured and automated.
Among others, Dev Services offers automated development setups for the following services: AMQP, Apicurio Registry, multiple relational databases, Elasticsearch, Kafka, Keycloak, RabbitMQ, Redis, Vault, and Kubernetes clients.
For example, when you start a project in development mode and install the PostgreSQL extension, Quarkus will automatically create a Docker container with a PostgreSQL server and create the configuration in the project to use this container.
Spring Compatibility
While Quarkus recommends using its own APIs, it offers a compatibility layer that allows the use of Spring-defined annotations, mapping them to libraries implemented and optimized by Quarkus.
There are compatibility layers for the following Spring APIs: Spring Web, Data, Data Rest, Security, Cache, and Dependency Injection.
This compatibility layer, on the one hand, could help with the migration of projects previously implemented with Spring Boot . On the other hand, it could be used temporarily to facilitate the adoption of the framework by a team with prior Spring experience.
Comparison with Spring Boot
For the purpose of comparison, an equivalent API was implemented in Spring Boot and Quarkus . Using these implementations, load tests were performed, consisting of the execution of 80 threads , each executing a loop with 80 repetitions of 4 requests .
In addition, both projects have been compiled both in standard and native formats.
Initialization
The following metrics have been collected on Docker containers during service initialization.
Comparison of resource consumption during initialization.
It can be seen that, in the standard version, Quarkus consumes a significantly lower amount of both CPU and memory.
While in natively compiled versions, Quarkus consumes considerably less memory, 25 MB versus 130 MB . As for CPU usage, Spring briefly consumes a higher amount of CPU, although this quickly equalizes to zero for both services.
Comparison of resource consumption during initialization, native compilation.
Load test
Once the load tests were executed, the following results were obtained.
Comparison of resource consumption during load testing.
In this case, it can be seen that, in the standard versions, CPU usage remains at similar values, while memory usage is considerably lower in the case of Quarkus.
As for the natively compiled versions, CPU usage remains similar, with the Spring version exceeding the Quarkus version in some peaks, while maintaining higher memory usage.
Comparison of resource consumption during load testing, native compilation.
Additional metrics
Additionally, the initialization, compilation and creation times of the Docker image have been collected.
Considering this data, the version with the best performance is Quarkus with native compilation. However, native compilation can cause problems with external libraries, so it's very important to run tests to verify proper operation.
Conclusions
Quarkus is a great option to consider when implementing microservices or functions, especially those that reside in containers located in Kubernetes clusters and cloud environments.
Quarkus offers a selection of tools chosen to improve the development experience and time, with pre-built configurations, frameworks, and integrations.
Furthermore, by being standards-based, if the team has experience developing Java EE-based applications, the learning curve can be significantly reduced.
It should be noted that, although Quarkus offers extensive documentation, other frameworks such as Spring have a larger community and number of developers.
Do you know the program Hunters?
Being a hunter means accepting the challenge of testing new solutions that deliver differentiated results. A cross-functional group capable of generating and transferring knowledge, with the ability to anticipate the digital solutions that will help us grow.
Find out more about Hunters .