Skip to content

A simple dropwizard bundle which will make it easier to do rolling deployments of applications behind a loadbalancer

Notifications You must be signed in to change notification settings

nitishgoyal13/dropwizard-oor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 8.

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>io.dropwizard.oor</groupId>
    <artifactId>dropwizard-oor</artifactId>
    <version>1.2.2</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.

About

A simple dropwizard bundle which will make it easier to do rolling deployments of applications behind a loadbalancer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%