WSO2 Elastic Load Balancer is currently retired.
Tenant partitioning is required in a clustered deployment to be able to scale to large numbers of tenants. There can be multiple clusters for a single service and each cluster would have a subset of tenants as illustrated in the diagram below. In such situations, the load balancers need to be tenant aware in order to route the requests to the required tenant clusters. They also need to be service aware since it is the service clusters which are partitioned according to the clients.
The following example further illustrates how this is achieved in WSO2 Elastic Load Balancer (ELB).
A request sent to a load balancer has the following host header to identify the cluster domain:
In this URL:
appserver.cloud-test.wso2.comis the service domain which allows the load balancer to identify the service.
carbon.as1.domain.comis the tenant domain which allows the load balancer to identify the tenant.
Services are configured with their cluster domains and tenant ranges in the in
ELB_HOME/repository/conf/ file. These cluster domains and tenant ranges are picked by the load balancer when it loads.
The following is a sample configuration of the loadbalancer.conf file.
In the above configuration, there is a host address which maps to the application server service. If required, you can enter multiple host addresses separated by commas.
There are two cluster domains defined in the configuration. The cluster domain named
carbon.as1.domain is used to load the range of tenants with IDs 1-100. The other cluster domain named
carbon.as2.domain is used to load the tenants with IDs 101-200.
If the tenant ID of
abc.com is 22, the request will be directed to the