stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nirmal Fernando <nirmal070...@gmail.com>
Subject Re: [Discuss] Domain Mappings for Subscriptions
Date Tue, 06 May 2014 15:57:05 GMT
Hi Imesh,

Thanks for the reply. How would LB withstand a re-start? How it gets to
know about the existing domain mappings?


On Tue, May 6, 2014 at 8:28 PM, Imesh Gunaratne <imesh@apache.org> wrote:

> No, domain mappings are persisted with the cartridge subscriptions (as an
> aggregate to subscription) in SM.
>
>
>
> On Tue, May 6, 2014 at 7:00 PM, Nirmal Fernando <nirmal070125@gmail.com>wrote:
>
>> Hi Imesh,
>>
>> Are you persisting these domain mappings in the topology?
>>
>>
>> On Sun, May 4, 2014 at 10:48 PM, Imesh Gunaratne <imesh@apache.org>wrote:
>>
>>> As I found HTTP DELETE requests do not include a message body, therefore
>>> I have updated the subscription domain remove method as follows:
>>>
>>> *Remove subscription domains:*
>>> *Send a DELETE request to the following URL with tenant credentials to
>>> remove a domain:*
>>>
>>> *DELETE
>>>  https://sm-ip:sm-port/stratos/admin/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domain/some.oragnization1.org
>>> <http://some.oragnization1.org/>*
>>>
>>> In-addition I have added a new method to validate domain names. This
>>> method will return false if the given domain is already registered with a
>>> subscription or true if it is valid for registration.
>>>
>>> *GET
>>>  https://sm-ip:sm-port/stratos/admin/cartridge/subscription/domain/some.oragnization1.org
>>> <http://some.oragnization1.org/>/is-valid*
>>>
>>> Thanks
>>>
>>>
>>> On Fri, May 2, 2014 at 10:55 PM, Imesh Gunaratne <imesh@apache.org>wrote:
>>>
>>>> Yes I think it will not cause any problems to request-in-flight (RIF)
>>>> stats. The RIF stat collector was implemented to track requests in-flight
>>>> count on each cluster:
>>>>
>>>>     // Map<ClusterId, Integer>
>>>>     private Map<String, Integer> clusterIdRequestCountMap;
>>>>
>>>>
>>>> On Fri, May 2, 2014 at 10:12 PM, Nirmal Fernando <
>>>> nirmal070125@gmail.com> wrote:
>>>>
>>>>> Hi Imesh,
>>>>>
>>>>> Sorry, I meant for the cluster. But I can't remember how we
>>>>> implemented the request-in-flight stats collector. So, what I wanted
to get
>>>>> verified is even a user send a request from a mapped domain, we would
still
>>>>> collect stats for the corresponding cluster.
>>>>>
>>>>>
>>>>> On Fri, May 2, 2014 at 10:05 PM, Imesh Gunaratne <imesh@apache.org>wrote:
>>>>>
>>>>>> Hi Nirmal,
>>>>>>
>>>>>> Can you please explain this requirement further? I'm not sure why
we
>>>>>> need to track request-in-flight against domain names.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> On Fri, May 2, 2014 at 9:34 PM, Nirmal Fernando <
>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>
>>>>>>> Hi Imesh,
>>>>>>>
>>>>>>> We also need to support request in-flight stats for domain maaped
>>>>>>> urls, in order to auto-scaling to work correctly. Do we have
it covered?
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Apr 29, 2014 at 9:59 AM, Imesh Gunaratne <imesh@apache.org>wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Currently tenants cannot map custom domain names to subscriptions.
>>>>>>>> The only possibility is to use hostnames generated by Stratos
Manager for
>>>>>>>> accessing applications deployed in Stratos via the load balancers.
>>>>>>>>
>>>>>>>> Therefore I thought it would be a great value addition to
implement
>>>>>>>> a new functionality to map domain names to subscriptions
as described
>>>>>>>> below. Please add your thoughts.
>>>>>>>>
>>>>>>>> *Functional Design:*
>>>>>>>>
>>>>>>>> Subscription domains will be managed by Stratos Manager together
>>>>>>>> with the subscription information. Once domains are added
to a given
>>>>>>>> subscription, a new event (SubscriptionDomainsAddedEvent
[serviceName,
>>>>>>>> tenantId, clusterIds, domains]) will be published to the
"tenant" topic and
>>>>>>>> it will be received by the load balancer. Load balancer will
update its
>>>>>>>> internal cluster map with the given information. Similarly
when domains are
>>>>>>>> removed, a new event (SubscriptionDomainsRemovedEvent [serviceName,
>>>>>>>> tenantId, clusterIds, domains]) will be published to the
"tenant" topic and
>>>>>>>> load balancer will update its cluster map accordingly.
>>>>>>>>
>>>>>>>> *New REST API methods:*
>>>>>>>>
>>>>>>>> 1. Add subscription domains:
>>>>>>>> Send a POST request to the following URL with tenant credentials
to
>>>>>>>> add subscription domains:
>>>>>>>>
>>>>>>>> POST  https://sm-ip:sm-port
>>>>>>>> /stratos/admin/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domain/
>>>>>>>> {
>>>>>>>>   "domains": [
>>>>>>>>      "some.oragnization1.org" ,
>>>>>>>>      "some.oragnization2.org" ,
>>>>>>>>      "some.oragnization3.org"
>>>>>>>>   ]
>>>>>>>> }
>>>>>>>>
>>>>>>>> 2. Get subscription domains:
>>>>>>>> Send a GET get request to the following URL with tenant credentials
>>>>>>>> to get existing subscription domains:
>>>>>>>>
>>>>>>>> GET  https://sm-ip:sm-port
>>>>>>>> /stratos/admin/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domain/
>>>>>>>>
>>>>>>>> 3. Remove subscription domains:
>>>>>>>> Send a DELETE request to the following URL with tenant credentials
>>>>>>>> to remove a given list of domain names:
>>>>>>>>
>>>>>>>> DELETE  https://sm-ip:sm-port
>>>>>>>> /stratos/admin/cartridge/{cartridgeType}/subscription/{subscriptionAlias}/domain/
>>>>>>>> {
>>>>>>>>   "domains": [
>>>>>>>>      "some.oragnization1.org"
>>>>>>>>   ]
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> --
>>>>>>>> Imesh Gunaratne
>>>>>>>>
>>>>>>>> Technical Lead, WSO2
>>>>>>>> Committer & PPMC Member, Apache Stratos
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Imesh Gunaratne
>>>>>>
>>>>>> Technical Lead, WSO2
>>>>>> Committer & PPMC Member, Apache Stratos
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Imesh Gunaratne
>>>>
>>>> Technical Lead, WSO2
>>>> Committer & PPMC Member, Apache Stratos
>>>>
>>>
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PPMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PPMC Member, Apache Stratos
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Mime
View raw message