Let me understand: can I use this to put a specific tenant to cluster and no-one else?
Also: can the config be dynamic? e.g. can I modify this definition at runtime? Or only static? Paul On 12 March 2012 13:31, 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 > > -- Paul Fremantle CTO and Co-Founder, WSO2 OASIS WS-RX TC Co-chair, VP, Apache Synapse UK: +44 207 096 0336 US: +1 646 595 7614 blog: http://pzf.fremantle.org twitter.com/pzfreo [email protected] wso2.com Lean Enterprise Middleware Disclaimer: This communication may contain privileged or other confidential information and is intended exclusively for the addressee/s. If you are not the intended recipient/s, or believe that you may have received this communication in error, please reply to the sender indicating that fact and delete the copy you received and in addition, you should not print, copy, retransmit, disseminate, or otherwise use the information contained in this communication. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions.
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
