GithubHelp home page GithubHelp logo

kidmam / springboot-graceful-shutdown Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leekyoungil/springboot-graceful-shutdown

0.0 1.0 0.0 13.48 MB

spring boot graceful shutdown library

Java 100.00%

springboot-graceful-shutdown's Introduction

  • illuminati-springboot-graceful-shutdown

The Illuminati-Graceful-shutdown library is available for Spring Boot project.

Required environment

  • Spring Boot 2.x
  • Oracle JDK 8, OpenJDK 10.0.2 (9, 11)

Why do we need to graceful shutdown library?

The SpringBoot does not supported the graceful shutdown basically. When a kill signal occurred. in progress or incoming request are all terminate immediately on application context. Therefore error occurs by user side.

A function of illuminati-springboot-graceful-shutdown

  • A function of safely shut down To prevent problems above, use it. if a kill signal occurred. it checks until all in progress requests are completed and safely shutdown.

  • Minimize errors in deploymene. Incoming requests after the kill signal return 503 http status. If you use more than one SpringBoot Application with the nginx proxy, you can deploy it nondisruptive.

How to use in the project.

  • maven & gradle (repository add to your configuration)
  • maven
<repositories>
  <repository>
  <id>jcenter</id>
  <url>https://jcenter.bintray.com/</url>
  </repository>
</repositories>
  • gradle
repositories {
   jcenter()
}
  • maven
<dependency>
  <groupId>me.phoboslabs.illuminati</groupId>
  <artifactId>illuminati-graceful-shutdown</artifactId>
  <version>0.2.5.6</version>
</dependency>
  • gradle
compile 'me.phoboslabs.illuminati:illuminati-graceful-shutdown:0.2.5.6'
  • Spring Boot Application
    • Use IlluminatiGracefulShutdown annotation on your Spring Boot Application.
@SpringBootApplication
@IlluminatiGracefulShutdown
public class SpringBootApplication {
    ...
}

============================================================================

Spring Boot 프로젝트에서 사용할 수 있는 Graceful shutdown 라이브러리 입니다.

필요환경

  • Spring Boot 2.x
  • Oracle JDK 8, OpenJDK 10.0.2 (9이상, 11지원)

왜 Graceful shutdown 기능이 필요할까요?

Spring Boot는 기본적으로 Graceful Shutdown을 지원하지 않습니다. Spring Boot는 kill(종료) 시그널 발생 시 진행중인, 혹은 현재 들어오는 요청을 모두 처리하지 않은 상태로 바로 애플리케이션 컨텍스트를 모두 제거해 버립니다. 따라서 유저 입장에서는 오류가 발생합니다.

illuminati-springboot-graceful-shutdown 기능

  • 안전한 종료 가능 위에 문제점을 방지 하고자 illuminati-springboot-graceful-shutdown 라이브러리를 사용하면 kill(종료) 시그널 발생 시 진행중인 요청이 모두 끝날때까지 체크하며 요청이 끝나는 것을 확인하고 안전하게 종료를 해줍니다.

  • 무중단 배포시 오류 최소화 또한 kill(종료) 시그널 발생 이후부터 들어오는 요청은 503 http status 로 돌려주며, 앞에 nginx 프록시로 Spring Boot Application을 2개 이상 사용한다면 무중단 배포가 가능합니다.

image image image image

License

illuminati-springboot-graceful-shutdown is distributed under the GNU GPL version 3 or later.

springboot-graceful-shutdown's People

Contributors

leekyoungil avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.