quarks
quarks

Reputation: 35316

Zero-downtime deployments with Quarkus

Quarkus is great but you can't do zero-downtime deployments, or can you?

My experience with Quarkus is very limited to simple RESTful web app. Running it natively as it's own container, no Jetty, not Tomcat, so it runs on its own.

The issue is, without being contained, say inside an application server (like NGINX Unit which provides zero downtime deployments out of the box) deploying Quarkus web apps would be very painful with almost 100% downtime unless you do some clever tricks.

My question here is: Can you have Quarkus-based web app deployments that can be zero-downtime? If yes, how?

Upvotes: 2

Views: 361

Answers (1)

Ladicek
Ladicek

Reputation: 6587

There are no "clever tricks" to zero downtime deployment. There's a simple principle everyone uses (I'm pretty sure Nginx Unit is no different): you front your application with a load balancer. (I heard Nginx is a good one...)

In order to udpate, you:

  1. keep the old version running and keep the load balancer pointed at it;
  2. start a new version;
  3. when it's fully started, redirect the traffic on the load balancer from old version to new version (there are multiple variants of this, you can redirect the traffic all at once or gradually, you can do session draining, etc.);
  4. when the old version is no longer used, stop it and remove it.

Quarkus is well suited to running in Kubernetes, which provides zero downtime deployments out of the box (using the same principle I described above).

Upvotes: 5

Related Questions