This documentation is for WSO2 API Manager 1.7.0 View documentation for the latest release.
Tenant-Aware Load Balancing using WSO2 ELB - API Manager 1.7.0 - WSO2 Documentation

All docs This doc
Skip to end of metadata
Go to start of metadata

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:

  • is the service domain which allows the load balancer to identify the service.
  • is 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/loadbalancer.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.

appserver {
# multiple hosts should be separated by a comma.
domains {
carbon.as1.domain {
tenant_range 1-100;
carbon.as2.domain {
tenant_range 101-200;

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 is 22, the request will be directed to the Carbon.AS1.domain cluster.

  • No labels