Share

How to create a multiple instances on a single server SaaS(Software as a Service)

Before going to topic first let me explain What is Multitenancy


Multitenanacy refers to principle in a software architecture where a single instance of the software runs on a server,serving multiple client organizations(tenants).It is contrasted with a multi-instance architecture where separate software instances are setup for different client organizations. 

It seems to like as follows


 As per my understanding liferay uses software as a service.Hope you got brief idea about multitenancy now lets move onto our liferay architecture an how it supports Multitenancy.The following figure is the best usecase to support multitenancy concept

If we observe above diagram we can have following points

1. A Single instance of liferay serving for two universities means two tenants.
2. In a single university we have two colleges respectively
3. For each college we have a different students
4. So if we develop a portlet then that portlet has to show the student records respect to in his/her         college.

Here our concentration is only on first point how single liferay server working for two tenants.Lets go technically now.

1. Login to the portal as Omni Administrator(test)
2. Goto the ControlPanel
       Under Configuration Goto the PortalInstances

3. Click on the Add button to add new instance
4. Give value as "JNTUniversity" for WebID,Virtual Host and Mail Domain


5. Click on Save button
6. Confirm a new instance got created as part of instances list.
7. Open "C:\Windows\System32\drivers\etc\hosts" in a notepad and append "127.0.0.1 
    JNTUniversity"and save this file.
8. Now how can you access new instance?
9. Open the browser and access an type "jntuniversity:8080".


10. Login to the new instance with email as test@JNTUniversity.com and password as "test".
11. See the below screenshots and observe the URLS.I am able to signIn both the instances and accessing the server.

Localhost



JNTUniversity


This is how Liferay supports Multi tenancy as a Single server instance.

No comments:

Post a Comment