Hi,


I have a situation with a Dropwizard service running on multiple servers in 
an active-active fashion behind a load balancer. The load balancer is 
verifying that each service instance is running by calling the "/ping" 
endpoint. If a response hasn't been received in 20 seconds, that service 
instance is considered dead and will not get any more requests until ping 
returns 200 again. In order to do seamless deployment, I want to have a 
shutdown hook such that the ping endpoint returns !200 for 20 seconds 
before shutting down the http server. During those 20 seconds, I want the 
service to function normally except for the ping response.

 

I have looked at using managed objects and using the "stop()" method, but 
it seems like the http server has already shutdown by then (as suggested by 
https://groups.google.com/forum/#!topic/dropwizard-user/UP1krCq--cA).


I have also looked at using a task like what is suggested 
in 
https://stackoverflow.com/questions/31288721/dropwizard-shutdown-hook/31296783#31296783
 
but I'm not a situation where I can make a http request before killing the 
jvm.


Any suggestions on how this can be acheived?

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to