The goal of multitenancy is to maximize resource sharing by allowing multiple users (tenants) to log in and use a single server/cluster at the same time, in a tenant-isolated manner. That is, each user is given the experience of using his/her own server, rather than a shared environment. Multitenancy ensures optimal performance of the system's resources such as memory and hardware and also secures each tenant's personal data.
You can register tenant domains using the Management Console of WSO2 products. See Managing Tenants for more information on adding and viewing tenants in the WSO2 Identity Server.
Tenant admin details are saved by default into an internal H2 database. This is configurable to point to an external database if preferred. This can then be scaled appropriately. The tenants can have there own multiple directories set up and these configurations can be dynamically configured via the Management Console.
When multitenancy is enabled and a tenant becomes inactive for a long period of time, the tenant is unloaded from the server's memory. By default, the time period is 30 minutes. After that, the tenant has to log in again before sending requests to the server.
You change the default time period allowed for tenant inactiveness by adding -Dtenant.idle.time=<time_in_minutes>
java property to the product's startup script ( ./wso2server.sh
file for Linux and wso2server.bat
for Windows) as shown below:
JAVA_OPTS \ -Dtenant.idle.time=30 \