Foren

Hello,From the...

Nilang I Patel, geändert vor 6 Jahren.

Hello,From the...

Junior Member Beiträge: 31 Beitrittsdatum: 26.07.11 Neueste Beiträge
Hello,

From the liferay forum 1 and forum 2, It seems sharding is not supported out of the box since Liferay 7 (and DXP). Only Database level sharding is possible.

Starting with Liferay 7, all liferay out of the box tables having column - companyId so database sharding can be performed based on column - companyId.

My questions are,
  • In case I am running two different instances on DXP, is it possible to have complete separate different login for two different instance ?
  • More particularly, I have one (default) instance already running (where I haven't put companyId for all my custom tables). I also have some hooks. Now I want to create new instance and configure separate site (with additional modules) for that (with its own login). Is it possible ? (since sharding is not available Out Of The Box)
  • In scenario I mentioned above, I feel I need to change the hook code if it has some redirection logic (for default instance). Please provide your thoughts on this.
  • If I implement it, what other challenges could come later on.


I would highly appreciate if you provide the solution in case if you come across such situation (specifically for DXP) .

Regards
Nilang
thumbnail
Andrew Jardine, geändert vor 6 Jahren.

RE: Hello,From the...

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

It seems sharding is not supported out of the box since Liferay 7 (and DXP). Only Database level sharding is possible.


Correct. Sharding support is mature enough with most database vendors that it doesn't make sense to put the burden on your application server.

In case I am running two different instances on DXP, is it possible to have complete separate different login for two different instance ? More particularly, I have one (default) instance already running (where I haven't put companyId for all my custom tables). I also have some hooks. Now I want to create new instance and configure separate site (with additional modules) for that (with its own login). Is it possible ? (since sharding is not available Out Of The Box)


Of course. The Instance Settings in the control panel (for example the authentication section) are specific to that instance. An instance is the nomenclature used in the UI to support the "Company" concept in the back end. So yes, you can have instance A that uses LDAP and instance B that uses SiteMinder. I would recommend going back to your custom entities (assuming this is a reference to service builder?) and add the companyId. This will make it easy for your new sharding solution to also work with your custom code. You may only use one of your custom plugins on one of your instances today, but you never know about the future. Best to put the column t future proof your solution.

In scenario I mentioned above, I feel I need to change the hook code if it has some redirection logic (for default instance). Please provide your thoughts on this.


I'm not sure what this means -- Liferay handles the redirection to the correct instance based on the virtual host that you provided when you created the new instance. Any requests that go to the Liferay server to a host that is not mapped to an instance, will automatically get redirected to the default portal instance.
Nilang I Patel, geändert vor 6 Jahren.

RE: Hello,From the...

Junior Member Beiträge: 31 Beitrittsdatum: 26.07.11 Neueste Beiträge
Hello Andrew,

Thanks a lot for detailed answer.

Regards
Nilang