> On March 31, 2016, 11:26 a.m., Bill Farner wrote:
> > src/main/java/org/apache/aurora/scheduler/http/LeaderHealth.java, line 54
> > <https://reviews.apache.org/r/45511/diff/4/?file=1320481#file1320481line54>
> >
> >     Is it useful to send a different status code for this state?  Seems 
> > like it doesn't make a difference to a load balancer, and trying to 
> > differentiate forces use of an awkward code.
> 
> Ashwin Murthy wrote:
>     I thought about this and decided to go with different codes to 
> disambiguate these two cases. My reasoning was If this endpoint ends up being 
> used for other things like a canary monitoring the leader health and the 
> different code could result in different action. Either way, not 
> differentiating it seems like hiding this information which could be 
> potentially useful in the future and I didnt see a good reason to hide it.

Perhaps, but IMHO 500 is potentially more insidious since it is the result of 
any unhandled exception in the scheduler.  I'd prefer to reserve 500 for the 
truly unknown and triage-worthy.


- Bill


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45511/#review126383
-----------------------------------------------------------


On March 30, 2016, 10:06 p.m., Ashwin Murthy wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45511/
> -----------------------------------------------------------
> 
> (Updated March 30, 2016, 10:06 p.m.)
> 
> 
> Review request for Aurora and Bill Farner.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> AURORA-1493: create ELB-friendly endpoint to detect leading scheduler. The 
> fix is to add a new endpoint - "/leaderhealth" which returns http status code 
> 200 (OK) if the instance is the leader. If the instance is not the leader but 
> a leading exists, returns 500 (Internal server error). If there is no leader 
> at all, returns 503 (Service unavailable)
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/http/LeaderHealth.java 
> PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/http/LeaderHealthTest.java 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45511/diff/
> 
> 
> Testing
> -------
> 
> Added new unit test
> 
> 
> Thanks,
> 
> Ashwin Murthy
> 
>

Reply via email to