[ 
https://issues.apache.org/jira/browse/MESOS-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14218271#comment-14218271
 ] 

Cody Maloney commented on MESOS-2130:
-------------------------------------

As my current working implementation goes, we don't keep adding endpoints over 
time, you still basically build up a static set of endpoints early on, and if 
you have a parameterized endpoint (/slave/{id}) then what you do is you 
register /slave, take the ID out manually, do whatever processing you want, and 
then call your own router with the rest of the path.

As such we don't greatly increase the size of the routing tables.

I'm still adding more tickets to this epic which should give a better overall 
picture. For proxying to slaves, all that lives in an independent process 
currently how I have it written (There is a /proxy endpoint). All the master 
has to do is Proxy::attach() slaves when they register, Proxy::detach() them 
when they deregister.

> Allow prefix routing of paths in libprocess
> -------------------------------------------
>
>                 Key: MESOS-2130
>                 URL: https://issues.apache.org/jira/browse/MESOS-2130
>             Project: Mesos
>          Issue Type: Improvement
>          Components: libprocess
>            Reporter: Cody Maloney
>            Assignee: Cody Maloney
>
> Currently libprocess can only route to UPIDs, and then within the upids one 
> top level "command". Ideally you can attach C++ endpoints to arbitrary paths, 
> including taking everything that matches a prefix:
> Ex:
> /slaves/:slave_id/ could proxy to an individual slave
> /slaves/ 
>  - Alias for /slave(1) if only one slave
> /slaves/{number} 
>  - point to an individual slave rather than requiring people to properly 
> encode () in urls.
> /proxy/go/master-leader/files/browse.json
>  - The endpoint would be /proxy/go, and then it internally processes the 
> request to find the host it should go to (What is the IP for the currently 
> elected master?) and then forwards the rest of the path to the target machine.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to