Foren

Lifeary instance - properties etc.?

Vanita Chawla, geändert vor 9 Jahren.

Lifeary instance - properties etc.?

New Member Beiträge: 23 Beitrittsdatum: 25.03.10 Neueste Beiträge
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:

1. 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?

2. From the post on Liferay portal instances, it seems like > The preferred way to configure a portal instance is through the Control Panel.

3. 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)?

4. Is there a limit on how many instances we can use? We may be using atleast 3-4 instances to start with. Any known issues with number of instances?

Thanks a lot for any information on this.
Raffaello Risso, geändert vor 8 Jahren.

RE: Lifeary instance - properties etc.?

New Member Beitrag: 1 Beitrittsdatum: 11.11.13 Neueste Beiträge
Hello
I have same needs.
Anyone can help us ?

thanks in advance,
thumbnail
Andew Jardine, geändert vor 8 Jahren.

RE: Lifeary instance - properties etc.?

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
Hi Vanita,

I think I can help on this one as I have a TON of experience with this.

1. 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?


This is true. Settings that are instance specific have a companyId associated to them. "Company" and "Portal Instance" are intercahangeable terms and basically map from the UI to the API. The issue really comes from plugins that are NOT company specific. For example, say you wrote a PortletStrutsAction hook that alters the way Web Content is saved. This is NOT geared towards any one instance -- it is server wide. I have used a trick to get around this where I add a propertty to the portal-ext.properties file which is the canonical name of the class and then configure the companyIds it supports. For example

com.mycompany.liferay.hooks.MyWebContentHook.enabled=true
com.mycompany.liferay.hooks.MyWebContentHook=10156,12994

Then in my hook I have a conditional that first checks if it is enabled, and if it is, if the companyId as part of the current request is listed in the second property. If it is, then I go ahead, if not, then I skip out. There are similar work arounds that I have used for JSP hooks as well -- but definitely something to be aware of.

From the post on Liferay portal instances, it seems like > The preferred way to configure a portal instance is through the Control Panel.


Correct. This is actually the recommended approach by Liferay and you will find in the portal.properties file comments that say as much. Be aware though that when you use the Portal Settings section in the control panel you basically override anything equivalent in the portal-ext. In some cases (another thread reently on here around LDAP) you will find that not all of the portal-ext options are available in the admin. These settings are all stored in the PortalPreferences table and to flip back to the portal-ext (in some cases) you would need to purge the record. The ownerId in that table is the companyId.

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)?


Sharding is disabled by default. Have a look at the spring.configs property in the portal.properties file and you will see that it is commented out. Sharding is something we use but that is because we want to keep the data for each instance separate. This was we can purge one company without affecting the others. Without sharding this becomes difficult as all the data is intertwined in the same tables. People will say "yes but it is scoped by companyId" which is true, but the companyId sometimes goes by other names (like ownerId referenced above). So whether or not to use sharding is an architectural decision about how close you want your data together. The other thing to note is that SOME things go into the default shard only. For example, when you create an instance, or a new shard -- those only go to the default. Also, when you deploy a service builder portlet the tables are created in all shards, not just the shards where you want to USE the portlet. All these things add up to... it's sharded, but not really sharded. I recently had a call with Liferay and they said that Sharding was introduced a while back before things like MySQL had really good support for it. If possible, they suggest sharding in a DATABASE configuration in place of a Liferay config. For us that wasn't an option, but maybe something else you should consider.

Is there a limit on how many instances we can use? We may be using atleast 3-4 instances to start with. Any known issues with number of instances?


None that I know of. I read a blog post a while back that a guy wrote and I think he refrenced 1500 --- it was an ISP I believe. We use about 10 oursevles... so you can go at least that high! emoticon