On Oct 24, 2013 3:17 PM, "Imesh Gunaratne" <[email protected]> wrote: > > Hi, > > Today we had an offline discussion on Multi-Tenancy support in Apache Stratos (incubating) version 4.0.0 with Lakmal and Reka. Please find the summary of the discussion below. > > Background > - Multi-tenant cartridges could be partitioned into clusters by defining tenant ranges for each cluster. > Example: (Cluster 1 - Tenant Range: 1-100, Cluster 2 - Tenant Range: 101-200, Cluster 3: Tenant Range: 201-*) > - Each tenant needs to define an id and a domain name. > > The Challenges > C1. One of the major challenges when implementing Multi-Tenancy support in a PaaS is that having a common mechanism to identify the tenant from the incoming request. Different applications could use different approaches. > C2. The next challenge in Stratos is that sending tenant information (tenant id and tenant domain name of a given subscription) from Stratos Manager to Load Balancers. > > The Proposal for C1 > The idea is to identify the tenant either using tenant id or tenant domain name. Here the tenant domain name represents the domain name used to subscribe to a Multi-Tenant cartridge. The following templates illustrates how an application could send tenant identifier in an URL. > > Template using Tenant ID: This bit of information will not be exposed to clients. So, I wonder there will be any use-case?! > <protocol>://<host-name>:<port>/<path>?<tenant-id-identifier>=<value> > Example: > http://subscription1.appserver.cloud-provider.org:8280/login?tenantId=1 > > Template using Tenant Domain Name: > <protocol>://<host-name>:<port>/<path>?<tenant-domain-identifier>=<value> > Example: > http://subscription1.appserver.cloud-provider.org:8280/login?tenantDomain=foo.org
Is there any reason for changing current url template? And I don't think multi-tenant environments can use such a pattern since AFAIK each tenant should have its own context. > > In the above examples the tenant id and tenant domain name identifiers are defined as "tenantId" and "tenantDomain". However we could make this configurable, so that those could be changed for a given Stratos environment or Multi-Tenant cartridge. > > The Proposal for C2: > Currently load balancers receive this information using a common database which I think is not a scalable option. > Tenant information could be published to a message broker topic and the load balancers could subscribe to this topic to retrieve the information. Using this approach we could preserve the loosely coupled nature of the load balancer. > We have to think in terms 100s/1000s of tenants. Would this approach scale to that level? Caz we need to publish tenant info of all the tenants periodically too. > Please feel free to add your thoughts. > > Many Thanks > Imesh
