Any update or idea on this? This issue blocks further improvements of tenant aware load balancer.
thanks. On Tue, Mar 20, 2012 at 11:33 AM, Sanjeewa Malalgoda <[email protected]>wrote: > Hi All, > We are having small issue with logging in to service(SSO Enabled) through > tenant aware load balancer. I have setup tenant aware load balancer fronted > 1 Identity Cluster and 2 appserver clusters. Problem is, i found that there > is a looping problem between appserver and is clusters because logging > requests doesnt have tenant domain in their URL's and then load balancer > misunderstand it as a request to super admin(Tenant Id 0) and forward it to > default cluster. > One possible solution for this is setting tenant domain as a parameter to > message context form identity side when user logging request comes and > Tenant aware load balancer checks that parameter only if tenant id is > 0.That is good solution in performance point of view. > > What do you think? > > Thanks- > > > On Tue, Mar 13, 2012 at 10:50 AM, Sanjeewa Malalgoda <[email protected]>wrote: > >> Thanks for pointing it out. i will correct it. >> Thanks >> >> >> On Mon, Mar 12, 2012 at 10:31 PM, Amila Maha Arachchi <[email protected]>wrote: >> >>> Hi Sanjeewa, >>> >>> Just wanted to point out, theres a little mistake in the diagam. AS >>> requests are going to ESB cluster and ESB requests are going to AS cluster >>> :). >>> >>> Nice diagram... >>> >>> Thanks, >>> AmilaM. >>> >>> On Mon, Mar 12, 2012 at 7:01 PM, Sanjeewa Malalgoda >>> <[email protected]>wrote: >>> >>>> Hi, >>>> >>>> Here i'm attaching the design diagram of this implementation, And >>>> configurations will be as follows. >>>> >>>> *01.LoadBalancer.xml file we can define domain and corresponding >>>> clusters and their tenant ranges as follows* >>>> >>>> <service> >>>> <hosts> >>>> <host>appserver.cloud-test.wso2.com</host> >>>> </hosts> >>>> <!--domain>wso2.carbon.as.domain</domain--> >>>> <domains> >>>> <domain> >>>> <name>wso2.as1.domain</name> >>>> <tenantRange>1,100</tenantRange> >>>> </domain> >>>> <domain> >>>> <name>wso2.as2.domain</name> >>>> <tenantRange>101,200</tenantRange> >>>> </domain> >>>> <domain> >>>> <name>wso2.as3.domain</name> >>>> <tenantRange>201,300</tenantRange> >>>> </domain> >>>> <domain> >>>> <name>wso2.as4.domain</name> >>>> <tenantRange>*</tenantRange> >>>> </domain> >>>> </domains> >>>> </service> >>>> >>>> *In synapse main.xml Endpoint Defines as follows* >>>> * >>>> * >>>> <endpoint name="tenantAwareLBEndpoint"> >>>> <class name >>>> ="org.wso2.carbon.endpoint.service.TenantAwareLoadBalanceEndpoint"> >>>> <parameter name="algorithm"> >>>> org.apache.synapse.endpoints.algorithms.RoundRobin</parameter> >>>> <parameter >>>> name="configuration">$system:loadbalancer.xml</parameter> >>>> <parameter name="failover">true</parameter> >>>> >>>> </class> >>>> </endpoint> >>>> >>>> Thanks. >>>> >>>> >>>> On Sun, Mar 4, 2012 at 2:09 AM, Afkham Azeez <[email protected]> wrote: >>>> >>>>> User management in the LB is not configured properly? We never used >>>>> this in the LB before. Even CarbonContext will not be created >>>>> >>>>> -- >>>>> Afkham Azeez >>>>> Sent from my phone >>>>> On Mar 3, 2012 9:30 PM, "Sanjeewa Malalgoda" <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi All, >>>>>> I was able to setup 2 app services clusters that maps to same host >>>>>> address and setup load balancer according to static >>>>>> configuration(host/domain/tenant range). with this implementation *we >>>>>> can send requests to correct cluster based on tenant domain in url*.For >>>>>> this i created new TenantAwareLoadBalancer endpoint in carbon end points >>>>>> and configure loadbalancer to use that end point(We can use external >>>>>> endpoints after azeez latest change to synapse trunk). First we get >>>>>> domainTenantContext(Which holds map of tenatid, cluster domain) object >>>>>> according to host address. Then we can get cluster domain >>>>>> from domainTenantContext object by passing tenant id (if there no any >>>>>> value >>>>>> that maps to tenantId key we will send that request to cluster with >>>>>> constant tenant id something like 0 or 1000 by this we can avoid upper >>>>>> range mapping). Map holds values something like below. >>>>>> >>>>>> tenat id cluster domain >>>>>> 1-200 as1.domain >>>>>> 201-400 as2.domain >>>>>> 0 as3.domain >>>>>> >>>>>> so if request comes to 401 tenant request will send to as3.domain >>>>>> cluster(default cluster). And regard sticky session implementation which >>>>>> we >>>>>> discussed in separate mail i will work with azeez. For this moment all >>>>>> configurations are hard coded and easily we can make them configurable. >>>>>> Ideas and comments are welcome on this. >>>>>> >>>>>> And i have one question inside loadbalancer product we are always >>>>>> getting getRealmService().getTenantManager().getTenantId(domainName) as >>>>>> -1 >>>>>> (which means no such tenant). What did we miss here ? >>>>>> >>>>>> >>>>>> >>>>>> Thanks. >>>>>> -- >>>>>> *Sanjeewa Malalgoda* >>>>>> Software Engineer >>>>>> ** >>>>>> *WSO2, Inc.* >>>>>> lean.enterprise.middleware. >>>>>> >>>>>> mobile : +94 713068779 >>>>>> web: http://wso2.com >>>>>> <http://sanjeewamalalgoda.blogspot.com/>blog >>>>>> :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/> >>>>>> >>>>>> [image: >>>>>> http://wso2.com/wp-content/themes/wso2ng-v2/images/logos/stratos_logo_h42.gif] >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Stratos-dev mailing list >>>>>> [email protected] >>>>>> https://wso2.org/cgi-bin/mailman/listinfo/stratos-dev >>>>>> >>>>>> >>>> >>>> >>>> -- >>>> *Sanjeewa Malalgoda* >>>> Software Engineer >>>> ** >>>> *WSO2, Inc.* >>>> lean.enterprise.middleware. >>>> >>>> mobile : +94 713068779 >>>> web: http://wso2.com >>>> <http://sanjeewamalalgoda.blogspot.com/>blog >>>> :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/> >>>> >>>> [image: >>>> http://wso2.com/wp-content/themes/wso2ng-v2/images/logos/stratos_logo_h42.gif] >>>> >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> *Amila Maharachchi* >>> Senior Software Engineer; WSO2, Inc.; http://wso2.com >>> >>> Blog: http://maharachchi.blogspot.com >>> Mobile: +94719371446 >>> >>> >>> >> >> >> -- >> *Sanjeewa Malalgoda* >> Software Engineer >> ** >> *WSO2, Inc.* >> lean.enterprise.middleware. >> >> mobile : +94 713068779 >> web: http://wso2.com >> <http://sanjeewamalalgoda.blogspot.com/>blog >> :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/> >> >> [image: >> http://wso2.com/wp-content/themes/wso2ng-v2/images/logos/stratos_logo_h42.gif] >> >> > > > -- > *Sanjeewa Malalgoda* > Software Engineer > ** > *WSO2, Inc.* > lean.enterprise.middleware. > > mobile : +94 713068779 > web: http://wso2.com > <http://sanjeewamalalgoda.blogspot.com/>blog > :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/> > > [image: > http://wso2.com/wp-content/themes/wso2ng-v2/images/logos/stratos_logo_h42.gif] > > -- *Sanjeewa Malalgoda* Software Engineer ** *WSO2, Inc.* lean.enterprise.middleware. mobile : +94 713068779 web: http://wso2.com <http://sanjeewamalalgoda.blogspot.com/>blog :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/> [image: http://wso2.com/wp-content/themes/wso2ng-v2/images/logos/stratos_logo_h42.gif]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
