advantageous / qbit

The Java microservice lib. QBit is a reactive programming lib for building microservices - JSON, HTTP, WebSocket, and REST. QBit uses reactive programming to build elastic REST, and WebSockets based cloud friendly, web services. SOA evolved for mobile and cloud. ServiceDiscovery, Health, reactive StatService, events, Java idiomatic reactive programming for Microservices.
http://advantageous.github.io/qbit/
Apache License 2.0
709 stars 140 forks source link

health port wrong code attempt two #701

Closed RichardHightower closed 8 years ago

RichardHightower commented 8 years ago

We have two health check ports, one is from the admin port and one is from the main port.

Historically we used the one form the main port which works better in Heroku like environments.

In our current project, we are using the health check from admin port which was always returning 200 even if there was an error (we did not use it before so did not notice) (it would return false if error in body or true in body). The one of the main port always worked right.

Our last fix, assumed the result builder defaulted to 200, it does not, so we were getting 0/true for ok, and 500/false (code/body) for not ok. Now we changed it to 200/true and 500/false like it should be and made the default for the response builder to be 200 so if you don't set it, the code will be 200.