We are looking into Liferay with multiple tenancy for business reasons for
disparate audiences. I have some questions around this. I'd appreciate
some insight on the following questions:
From the question/post liferay and more instances, it seems like there are constraints
around Portal properties where some are global versus instance specific. Is there any
list or insight on what properties are global Liferay scoped versus instance specific?
a portal instance is through the Control Panel.
From talking to various people, it also seems like sharding with portal instances
has some performance known issues. It is recommended to turn off sharding
when using instances.
Does anyone know which Liferay properties to use to turn the sharding off or
if sharding is
off in Liferay 6.2 by default (if so, which properties to review to confirm that
sharding is off)?
Is there a limit on how many instances we can use? We may be using atleast 3-4
instances
to start with. Any know known issues with number of instances?
Thanks a lot for any information on this.
Ans-Here is what I found from another source in case it helps someone:
One of the first and most important things to remember about portal properties is
that they are always overridden by any settings made in the Liferay Control Panel.
The reason why is that any configuration done in the Control Panel is saved directly to
the database and the configuration set in the database is always read after the portal properties have been imported, thus overriding them. Once a configuration has been
done in the Control Panel, that setting can never again be modified or altered by a
portal property.
This does make one wonder why there are two places to make setting configuration
changes and why the Control Panel trumps the portal properties file every time.
The reason why this is done is directly related to your first question regarding
global and scoped settings.
The portal-ext.properties file is often used to set configuration for that physical
bundle of Liferay; every instance of Liferay on that physical bundle will inherit those
settings, but those settings will not be automatically inherited by any other Liferay
node or bundle of the same instance.
The Control Panel is often used to set configuration for that instance of the Liferay
Portal; every node connecting to that instance will inherit these settings and override
any values set in the portal properties, but those settings will only be inherited by
other nodes connecting to the same instance.
In other words... - The Control Panel settings are used for the Liferay instance. -
The portal properties settings are used for the Liferay bundle - The Control Panel
settings will always override the portal properties settings
This does allow some control on how to set default properties for the bundle or node,
as well as to save configuration for the entire instance. As an example, you will want
to use the portal properties to configure cluster settings, the database connection
settings, document library connections, as well as other performance/system settings.
However, you will also be given a choice of where to configure settings such as the
mail server. If you set it in the portal properties, every instance of Liferay on that node
will have those settings automatically, which may not be desirable depending your
goals. If you set it in the Control Panel, then ever Liferay node connecting to that
instance will get those settings automatically, but the portal properties will not modify
those settings again.
Now, there is a way to create an instance specific portal properties file that will have
values only read by that instance of Liferay. Please note that this does complicate
things even further and it may not be desirable for your goals. The following property
and its definition explain how to accomplish this:
The choice is yours on where you want to configure your portal settings and with the
above knowledge I believe you will be able to make the best decision for your goals.
In regards to sharding, sharding is disabled by default and has to be manually
configured via portal properties as well as via the database itself. This is a slightly
older wiki article on how to enable database sharding support in Liferay, https://www.liferay.com/community/wiki/-/wiki/Main/Database+Sharding.
For reference, here are some of the properties that need to altered: ## ## Sharded
Databases ##
In regards to the number of instances allowed, there are no hard limits but please
note that each instance will be competing for the same amount of resources and
performance degradation will likely occur. This does make performance tuning
even more important than normal to avoid undesirable performance.
As an FYI - from testing I found that the following properties to configure the
Announcement portlet template etc. is only possible via the portal-ext.properties
file and not via the control panel. So if the values of the properties are different
between instances than you will need a company specific properties file.
Hope this helps!
or
A Note of Liferay Portal Instances
Liferay provides us facility to run more than one portal instance on a single server. Liferay comes with one
inbuilt portal instance, which is names 'Liferay' and its web id is 'liferay.com', however it can be
modified with following properties in portal-ext.properties file:
which can be referred in Liferay Portal SRC.
If we login as administrator (generally test@liferay.com), and go to control panel we can see list of
all available portal instances in 'Portal Instances' section inside 'Server' category. Here we will see a table
with atlest one entry (inbuilt one) , lets know what the column of this table depicts:
Enough of theory, lets experience it. Startup the server and replicate the following steps:
instances. To enable this feature, set the "company-id-properties" system property to true.
The read order will now be: portal.properties, then portal-ext.properties, and then portal-liferay.com.
properties. Note that not all properties can have different values per company. This functionality is
only available for legacy reasons. The preferred way to configure a portal instance is through the
Control Panel.
Handling Portal Instances in Custom Code: In real life scenario, we may need to process data differently for each Portal Instance in our custom
code. So have a look on small code snippet:
|
Providing solution(interview tips) and doing implementation based on Liferay Portal and Java/J2EE technologies.
Sunday, 13 September 2015
Liferay with multiple tenancy for business reasons
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment