Skip to content

Latest commit

 

History

History
executable file
·
52 lines (39 loc) · 1.44 KB

README.md

File metadata and controls

executable file
·
52 lines (39 loc) · 1.44 KB

Dropwizard Oor Bundle Travis build status

This bundle adds a healthcheck which can used to take the application out of rotation from a loadbalancer which uses /healthcheck endpoint for healthchecks This bundle compiles only on Java 17.

Usage

This makes it easier perform rolling deployments & maintenance of dropwizard applications

Build instructions

  • Clone the source:

    git clone github.com/phaneesh/dropwizard-oor
    
  • Build

    mvn install
    

Maven Dependency

  • Use the following maven dependency:
<dependency>
    <groupId>com.github.phaneesh</groupId>
    <artifactId>dropwizard-oor</artifactId>
    <version>3.0.7-1</version>
</dependency>

Using Oor bundle

Bootstrap

    @Override
    public void initialize(final Bootstrap...) {
        bootstrap.addBundle(new OorBundle() {
            
            public boolean withOor() {
                return false;
            }
            
        });
    }

Tasks

  • curl -XPOST http://host:adminport/tasks/oor for taking node out of rotation
  • curl -XPOST http://host:adminport/tasks/bir for bringing node back into rotation

Note

Please allow the node to run for the grace period and a bit more that you have configured in your load balancer healthchecks so that the load balancer can drain all the requests gracefully.