Spring Boot vs Quarkus vs Struts 2: A Practical Java Backend Benchmark

Same application, same dataset, same JVM: measuring how Spring Boot, Quarkus, and Struts 2 perform in real-world conditions.

The Java backend ecosystem has evolved significantly over the years. Three frameworks illustrate this evolution particularly well, each representing a different era and philosophy:

  • Spring Boot: today’s de facto standard
  • Quarkus: the cloud-native challenger
  • Struts 2: the legacy framework still widely found in enterprise environments

Rather than comparing documentation, feature lists, or marketing promises, I wanted to measure them on a deliberately simple and reproducible use case. Same application, same business model, three implementations.

I focused on four metrics:

  • Startup time
  • Response time
  • Number of bundled dependencies
  • Memory consumption

The goal is not to declare a winner, but to put numbers behind common questions:

Does Quarkus really start faster? Does Spring Boot package significantly more dependencies? Is Struts still competitive?

Let’s find out.

Benchmark Overview

To ensure a fair comparison, each implementation is built around exactly the same business requirements.

The chosen domain is intentionally simple: an API managing authors and articles.

Authors have a one-to-many relationship with articles.

The models and implementation details will be covered separately for each framework, but the exposed endpoints are identical across all three:

GET /authors
GET /authors/{id}
GET /authors/{id}/articles
GET /articles
GET /articles/{id}
POST /articles

The scope is intentionally limited. The objective is not to benchmark business logic, but the framework itself: runtime startup, HTTP handling, JSON serialization, database access, and dependency management.

Test Environment

All measurements were performed on the same machine.

Each measurement was executed multiple times on both cold and warm JVMs.

The results shown below correspond to the average and median across 10 iterations.

Quick Overview of the Frameworks

Spring Boot

Spring Boot has become the de facto standard for modern Java backend development. Its primary goal is to minimize configuration and allow developers to launch production-ready applications quickly.

Strengths:

  • Auto-configuration
  • Deep integration with the Spring ecosystem
  • Excellent documentation
  • Strong enterprise adoption

The trade-off is a heavier runtime, a larger dependency footprint, and sometimes significant abstraction layers.

Quarkus

Quarkus takes a different approach, focusing heavily on build-time optimizations, fast startup, low memory consumption, and cloud-native workloads.

It is particularly well suited for Kubernetes, containers, and serverless environments.

Its promise: Java with a lighter and faster runtime profile.

Note: Quarkus also supports native compilation through GraalVM. This benchmark focuses exclusively on JVM mode to keep the comparison fair across all three frameworks.

Struts 2

Apache Struts belongs to an earlier generation of Java web frameworks.

Long before Spring Boot became dominant, Struts was a standard choice for enterprise web applications and remains present in many legacy systems today.

Strengths:

  • Explicit architecture
  • Historically widespread adoption
  • Limited reliance on conventions

However:

  • Less focused on modern REST APIs
  • More manual configuration
  • Fewer contemporary development tools

Comparing Struts with Spring Boot and Quarkus is interesting not because it pits generations against each other, but because it allows us to quantify how Java backend development has evolved over time.

Startup Time

Measured from JVM launch until the application is ready to accept its first request.

Without surprise, Quarkus starts the fastest.

Even in JVM mode, without native compilation, it benefits from aggressive build-time optimizations. Much of what Spring Boot or Struts initialize at runtime is prepared earlier in the application lifecycle.

Spring Boot remains very respectable, starting in roughly one and a half seconds. Slower than Quarkus, certainly, but perfectly acceptable for most traditional backend applications that remain running for long periods.

Struts lags significantly behind.

However, the comparison requires some context: Spring Boot and Quarkus were launched as executable application JARs, while Struts was deployed as a WAR running on Jetty.

The measured startup time therefore includes servlet container startup, web application deployment, and framework initialization. This is representative of a significant portion of the legacy Java world: the framework is not standalone and depends heavily on its hosting container.

The trend remains clear:

the newer the framework, the more startup performance becomes a first-class concern.

Quarkus was designed around this constraint, Spring Boot has progressively optimized for it, while Struts comes from an era where startup time was rarely considered critical.

Memory Consumption

*Measured through Maven + Jetty in the same JVM process and therefore not directly comparable.

Spring Boot and Quarkus are relatively close, with Quarkus maintaining a small advantage of roughly 25 MB.

This aligns with its build-time optimization strategy, even in JVM mode.

With GraalVM native compilation, the difference would become much more significant, with memory usage typically dropping closer to 50 MB.

Struts appears dramatically lighter, but the measurement is influenced by the deployment model. A fair comparison would require deploying the WAR on a standalone Jetty server.

Interestingly, this reflects one of the key characteristics of legacy Java architectures: the framework itself is only one part of the runtime environment.

Response Time

Benchmark endpoint:

GET /articles/1

*P95 (95th percentile) represents the response time below which 95% of requests complete, with the remaining 5% taking longer.

Response-time differences are far less pronounced.

Once started, all three frameworks respond within essentially the same range: roughly 14–15 milliseconds on average for this endpoint.

The cold request is slower across the board, which is expected. The first request still triggers several internal initializations, including JSON serialization, JPA/Hibernate setup, and SQL statement preparation.

Struts is the slowest on the first request, but the gap remains relatively small.

The most interesting metric is the P95.

All three frameworks remain remarkably close, with Struts even showing a slight advantage in this specific measurement.

This does not mean Struts is inherently faster. Rather, it demonstrates that in a simple CRUD scenario with minimal business logic and an in-memory H2 database, the HTTP framework itself is not the dominant factor.

In other words:

For a simple API that is already running, Spring Boot, Quarkus, and Struts can deliver very similar response times.

The real differences emerge elsewhere:

  • Developer experience
  • Startup performance
  • Cloud integration
  • Observability
  • Packaging
  • Operational tooling

Bundled Dependencies

The dependency count is interesting, but it should not be interpreted too quickly.

Quarkus bundles the highest number of dependencies, yet its final artifact is smaller than Spring Boot’s.

This demonstrates that raw dependency count alone is not a reliable measure of application weight.

Spring Boot produces the largest artifact in this benchmark.

This aligns with its philosophy: it bundles numerous ready-to-use integrations and provides a highly complete development experience. That convenience comes at the cost of a larger package.

Struts is the lightest both in dependency count and artifact size.

However, this apparent simplicity also reflects the fact that Struts provides fewer features out of the box.

Much of the infrastructure wiring remains manual:

  • Web configuration
  • Servlet container setup
  • JPA initialization
  • JSON mapping
  • Lifecycle management

The framework bundles less, but requires more plumbing.

Summary Table

This summary highlights the key takeaway from the benchmark:

The largest differences appear during startup, not during steady-state request processing.

Quarkus clearly leads on startup performance.

Spring Boot remains very close in real-world usage.

Struts mainly illustrates the cost of its older architecture based on WAR deployment within a servlet container.

For a simple request, however, all three frameworks deliver comparable performance.

Conclusion

This benchmark is not intended to declare one framework objectively superior to another.

Each framework was created for a different era and addresses different needs.

What stands out most is the evolution of Java backend development itself.

From Struts to Spring Boot, and then from Spring Boot to Quarkus, we can clearly see shifting priorities:

  • Less configuration
  • Faster startup
  • Better cloud integration
  • More runtime optimization

The Java platform remains the same.

The way we build Java backends continues to evolve.

And that is precisely what makes this kind of benchmark interesting: putting concrete numbers on that evolution.


Spring Boot vs Quarkus vs Struts 2: A Practical Java Backend Benchmark was originally published in Javarevisited on Medium, where people are continuing the conversation by highlighting and responding to this story.

This post first appeared on Read More