Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

Why should I choose Quarkus over Spring for my microservices?

August 31, 2021
Eric Deandrea
Related topics:
JavaKubernetesMicroservicesQuarkusSpring Boot
Related products:
Red Hat build of Quarkus

Share:

    Ready to dive into developing applications with Quarkus? Download our free e-book Quarkus for Spring Developers, which helps Java developers familiar with Spring make a quick and easy transition.

    As interest grows in microservices and containers, Java developers have struggled to make applications smaller and faster to meet today’s demands and requirements. In the modern computing environment, applications must respond to requests quickly and efficiently, be suitable for running in volatile environments such as virtual machines or containers, and support rapid development. Because of this, Java, and popular Java runtimes, are sometimes considered inferior to runtimes in other languages such as Node.js and Go.

    The Java language and platform have been very successful over the years, preserving Java as the predominant language in current use. Analysts have estimated the global application server market size at $15.84 billion in 2020, with expectations of growing at a rate of 13.2% from 2021 to 2028. Additionally, tens of millions of Java developers worldwide work for organizations that run their businesses using Java. Faced with today’s challenges, these organizations need to adapt and adopt new ways of building and deploying applications. Forgoing Java for other application stacks isn’t a choice for many organizations. It would involve re-training their development staff and re-implementing processes to release and monitor applications in production.

    Java is still relevant

    With additions to Java and Java frameworks over the past few years, Java can proudly retain its role as the primary language for enterprise applications. Quarkus, an open source project introduced by Red Hat, is one such framework that has taken the Java community by storm. Quarkus combines developer productivity and joy with the speed and performance of Go.

    Quarkus integrates with other modern Java frameworks and libraries that many developers are already familiar with and most likely using. Among the specifications and technologies underlying and integrated with Quarkus are Eclipse MicroProfile, Eclipse Vert.x, Contexts and Dependency Injection (CDI), Jakarta RESTful Web Services (JAX-RS), the Java Persistence API (JPA), the Java Transaction API (JTA), Apache Camel, and Hibernate, just to name a few.

    Quarkus and Spring address many of the same types of applications, but because it was born in today’s day and age, Quarkus has the advantage of starting with a clean slate. Quarkus can focus on innovation in modern areas of development pertaining to scalable, cloud-hosted applications because it doesn’t have to retrofit new patterns and principles into an existing codebase that has evolved over time.

    But I already know Spring!

    Quarkus for Spring Developers introduces Quarkus to Java developers with a special eye to helping those familiar with Spring’s concepts, constructs, and conventions learn Quarkus quickly. Spring developers should immediately recognize and be able to apply patterns they are already familiar with, and in many instances, using the same underlying technologies. Using Kotlin in your Spring applications? Great—you can continue using Kotlin with Quarkus.

    Chapters are devoted to getting started, RESTful applications, persistence, event-driven services, and cloud environments such as containers and Kubernetes. Each chapter offers like-for-like examples and emphasizes testing patterns and practices with such applications, while also differentiating Quarkus from Spring.

    Additionally, Quarkus provides a set of extensions for various Spring APIs. These extensions help simplify the process of learning Quarkus or migrating existing Spring applications to Quarkus, capitalizing on a developer’s Spring knowledge to accelerate the learning curve to adopt Quarkus. In some cases, an existing Spring application may even be able to run in Quarkus without any code changes.

    How can Quarkus help me?

    Quarkus has many features and capabilities that can help both developers and operations teams.

    Enhancing developer productivity

    Since its inception in early 2019, Quarkus has focused on more than just delivering features. Developer productivity and joy have been critical goals. With every new feature, Quarkus carefully considers the developer experience and how to improve it.

    The development process is faster and more pleasant with Quarkus's live coding feature. Quarkus can automatically detect changes made to Java and other resource and configuration files, then transparently re-compile and re-deploy the changes. Usually, within a second, you can view your application’s output or compiler error messages. This feature can also be used with Quarkus applications running in a remote environment. The remote capability is useful where rapid development or prototyping is needed but provisioning services in a local environment isn’t feasible or possible.

    Quarkus takes this concept a step further with its continuous testing feature to facilitate test-driven development. As changes are made to the application source code, Quarkus can automatically rerun affected tests in the background, giving developers instant feedback about the code they are writing or modifying.

    Need a database for your application? Kafka broker? Redis server? AMQP broker? OpenID Connect authentication server? API/Schema registry? Quarkus Dev Services for databases (see the video demo), Dev Services for Kafka (see the video demo), Dev Services for Redis, Dev Services for AMQP, Dev Services for OpenID Connect (see the video demo), and Dev Services for Apicurio Registry have you covered. Dev Services makes development faster by providing needed infrastructure automatically, eliminating all the required provisioning and configuration hassle. New Dev Services are added with each new release.

    Following the philosophy of simplicity and enhancing developer productivity, building an application into a native image is extremely simple. All the heavy-lifting and integration to consume GraalVM is done for you by the Quarkus build tools. Developers or CI/CD systems simply need to run a build, just like any other Java build, to produce a native executable. Tests can even be run against the built artifact.

    Kubernetes native

    From the beginning, Quarkus was designed around Kubernetes-native philosophies, optimizing for low memory usage and fast startup times. As much processing as possible is done at build time. Classes used only at application startup are invoked at build time and not loaded into the runtime JVM, reducing the size, and ultimately the memory footprint, of the application running on the JVM.

    This design accounted for native compilation from the onset, enabling Quarkus to be "natively native." Similar native capabilities in Spring are still considered experimental or beta, and in some instances, not even available. Coupled with a runtime platform like Kubernetes, more Quarkus applications can be deployed within a given set of resources than other Java or Spring applications.

    To be or not to be reactive?

    With Spring, a developer needs to decide up front, before writing a line of code, which architecture to follow for an application. This choice determines the entire set of libraries that a developer uses in a Spring application. Quarkus does not have such limitations because it was born in the reactive era. Quarkus, at its core, is based on a fully reactive and non-blocking architecture powered by Eclipse Vert.x.

    Quarkus integrates deeply with Vert.x, allowing developers to utilize both blocking (imperative) and non-blocking (reactive) libraries and APIs. In most cases, developers can use both blocking and reactive APIs within the same classes. Quarkus ensures that the blocking APIs will block appropriately while the reactive APIs remain non-blocking.

    Ready to give it a try?

    The Developer Sandbox for Red Hat OpenShift, which offers a free and ready-made environment for trying out containerized applications, is set up to support Quarkus. Whether you run on-premises, on Red Hat OpenShift, or in another cloud setting, the many open source capabilities of Quarkus are available.

    Quarkus for Spring Developers will help get you started and guide you through your journey.

    Last updated: September 19, 2023

    Related Posts

    • Spring Boot on Quarkus: Magic or madness?

    • Quarkus for Spring developers: Getting started

    • Migrating a Spring Boot microservices application to Quarkus

    • Test-driven development with Quarkus

    • Migrating Spring Boot tests to Quarkus

    • 10 reasons to develop Quarkus applications on Red Hat OpenShift

    Recent Posts

    • How to run AI models in cloud development environments

    • How Trilio secures OpenShift virtual machines and containers

    • How to implement observability with Node.js and Llama Stack

    • How to encrypt RHEL images for Azure confidential VMs

    • How to manage RHEL virtual machines with Podman Desktop

    What’s up next?

    Quarkus for Spring Developers

    Java can be clunky and slow. Learn how to optimize Java for today’s compute and runtime demands with Quarkus—a Kubernetes-native platform. Quarkus for Spring Developers introduces Quarkus to Java developers, with a special eye for helping those familiar with Spring’s conventions make a quick and easy transition.

    Get the e-book
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue