Hi, @Tomas Senart. Currently, my patch is to redirect the request to
correct url. For example:

$ curl -i http://master1:5050/master/tasks.json
HTTP/1.1 307 Temporary Redirect
Date: Mon, 01 Jun 2015 06:30:08 GMT
Location: http://master2:5050/master/tasks.json
Content-Length: 0

Assume master1 is not a leader, master 2 is the leader. When you send your
request to master1, you could recieve the redirection to master2. And the
location field in response headers also contains the correct url. And this
is a single patch, not a precursor for something else. Also thanks the help
from @adam and @alex. :-)

On Wed, Jul 1, 2015 at 12:12 PM, Tomás Senart <to...@mesosphere.io> wrote:

> Hi Haosdent,
>
> Thanks for the heads up. Would you be able to share the rationale for this
> change? Is it a precursor for something else?
>
> Best,
> Tomás
> On Tue 30 Jun 2015 at 19:24 haosdent <haosd...@gmail.com> wrote:
>
> > Hi All,
> >
> > We intend to introduce a breaking change[1] in the http endpoints. For
> > below http endpoints, when user request to a master which is not a
> leader,
> > user would got a 302 redirect to the leader master.
> >     * /slaves
> >     * /state
> >     * /stateSummary
> >     * /roles
> >     * /teardown
> >     * /tasks
> > For other endpoints in master, the behaviour is not change. If your
> > existing framework relied on this behaviour, I suggest add a logic to
> > handle 302 redirect response. Let me know if you have any
> queries/concerns.
> > Thank you very much.
> >
> > Links:
> > [1]  Tracking JIRA: https://issues.apache.org/jira/browse/MESOS-1865
> >
> >
> > --
> > Best Regards,
> > Haosdent Huang
> >
>



-- 
Best Regards,
Haosdent Huang

Reply via email to