The goal of multitenancy is to maximize resource sharing across multiple users (while hiding the fact that these users are on the same server) and to ensure optimal performance. You can register tenants in the ES Management Console, allowing tenants to maintain separate domains for their institutions.
When multitenancy is used, certain tenants can sometimes become inactive for a long period of time. By default, if the inactive period is 30 minutes, the tenant is unloaded from the server memory. This requires the tenant to log in again before sending requests to the server.
If required, you can change the default time allowed for tenant inactiveness by adding the
-Dtenant.idle.time=<time_in_minutes> java property to the product startup script (
./wso2server.sh file for Linux and
wso2server.bat for Windows) as shown below:
Adding a tenant
To add a new tenant, take the following steps:
- On the Configure tab of the Management Console, click Add New Tenant.
- Enter the information about this tenant as follows:
- Domain - The domain name for the organization, which should be a unique name (e.g., abc.com).
- Usage plan for the tenant - The usage plan defines limitations (such as number of users) for the tenant.
- First Name - First name of the tenant admin.
- Last Name - Last name of the tenant admin.
- Admin Username - The username the tenant admin will use to log in. The username must always end with the domain name (e.g., [email protected]).
- Email - The email address of the admin.
- Click Save.
- Log into the Publisher. This step needs to be executed, so that ES can assign the default roles in ES to the newly created tenant.
To view existing tenants, on the Configure tab in the Management Console, click View Tenants.