Skip to content
Ameen Abozaid
Planned lessonJNR-052-L05

Graceful shutdown and rollback

  • Lesson 5 of 7
  • Junior
On This Lesson 4 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

stop and revert without dropping requests.

Planned topics

  • On SIGTERM a graceful shutdown finishes in-flight requests: server.shutdown=graceful plus a timeout.
  • The platform sends SIGTERM, waits, then SIGKILL; set the timeout under that grace period.
  • Roll back by redeploying the previous image tag; this is why tags must be unique and old images kept.
  • Database changes complicate rollback: make migrations backward compatible.
  • Practice the rollback before you need it.
Draft outline details

Demonstration

yaml
server.shutdown: graceful
spring.lifecycle.timeout-per-shutdown-phase: 20s

Check your understanding

What is the fastest rollback for a bad release?

Show answer

Redeploy the previous image tag.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.