> On March 31, 2016, 6:26 p.m., Bill Farner wrote: > > src/main/java/org/apache/aurora/scheduler/http/LeaderHealth.java, line 47 > > <https://reviews.apache.org/r/45511/diff/4/?file=1320481#file1320481line47> > > > > Let's make this endpoint browser-friendly too and include some text. > > How about something like: > > > > ``` > > This is the leading scheduler. > > > > This endpoint can indicate to a load balancer which of a group of > > schedulers is leading. The response codes are: > > 200: This is the leading scheduler. > > xxx: Another scheduler is leading. > > yyy: There is no leader currently, or the leader is unknown. > > ```
Done - Ashwin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45511/#review126383 ----------------------------------------------------------- On March 31, 2016, 5:06 a.m., Ashwin Murthy wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/45511/ > ----------------------------------------------------------- > > (Updated March 31, 2016, 5:06 a.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 > >