Forum Ametys

Forum de la communauté Ametys

You are not logged in.

#1 21/03/2018 17:10:15

srini_r
Guest
Registered: 06/02/2018
Posts: 41

Clustering Ametys Servers

Hi,

Is it possible to run ametys in a tomcat cluster? the admin console must be available only on one instance but i would want to run the website on multiple instances of tomcat? is there any special steps to be done for this? can someone point me to a documentation if available for this?


regards

Offline

#2 21/03/2018 18:51:09

Raphaël Franchet
Expert Team
From: Toulouse
Registered: 10/08/2010
Posts: 1,091

Re: Clustering Ametys Servers

you can cluster the front-office as a classic j2E app

for the back office, the issue will come from the JCR, that cannot be accessed by many applications at once when stored localy.

we never needed to cluster any of ours instances for performances purposes.
why do you want to cluster?


Raphael Franchet
Expert Ametys

Offline

#3 21/03/2018 19:31:53

srini_r
Guest
Registered: 06/02/2018
Posts: 41

Re: Clustering Ametys Servers

Hi Raphael,

I dont want to cluster the CMS application. that wont be having much load. but the front-end application has to be clustered because we are testing for a heavy load as per a customer specification.

So, the cms web application can be hosted on one tomcat and the site can be hosted on multiple tomcats, but all of them would be pointing to the same postgreSQL database? how about the JCR configuration? should the JCR be running as a separate service or it would be running as part of both the cms and site application? in that case, will there be locking/integrity issues?

Offline

#4 21/03/2018 20:57:01

Cédric Damioli
Ametys Product Manager
From: Toulouse
Registered: 10/08/2010
Posts: 293

Re: Clustering Ametys Servers

Be aware that depending on your actual data, the back-office MAY be heavy loaded, even if no contributor at all is actually connected to the platform.

First question : does your pages contain mainly contents, or dynamic services ? If there's almost only contents, resulting pages will be put in the front static cache, and served quickly even under heavy load.
On the other hand, if you have mostly dynamic information and uncacheable services, the front-office will proxy all requests to the back-office.

Offline

#5 22/03/2018 04:36:34

srini_r
Guest
Registered: 06/02/2018
Posts: 41

Re: Clustering Ametys Servers

Hi cedric,

thanks for the reply. We are setting up the CMS in a kind of headless model. our templates will not have the header and footer. but there would be articles,photo gallery and even custom service that would be fetching the XML content from a product service as list of products and then make the layout and return the HTML.

the customer's eCommerce system would be doing the display in their layout.

Offline

#6 22/03/2018 16:49:06

Cédric Damioli
Ametys Product Manager
From: Toulouse
Registered: 10/08/2010
Posts: 293

Re: Clustering Ametys Servers

Will your custom service be cacheable ?
If so, resulting pages will be put in the Ametys static cache.

Offline

#7 22/03/2018 18:32:30

srini_r
Guest
Registered: 06/02/2018
Posts: 41

Re: Clustering Ametys Servers

yes. it can be cacheable. in between, i was trying to deploy the cms application in one tomcat where it wont be clustered and another tomcat instance to host the 'site' web application.

iam not able to reach the 'site' web application in the second tomcat. my architecture is that on the tomcat instance where 'cms' is running, there is no 'site' application and vice versa. is that a correct architecture?

or should I have the 'cms' and 'site' both applications in all the tomcat servers?

regards

Offline

#8 22/03/2018 19:18:30

Cédric Damioli
Ametys Product Manager
From: Toulouse
Registered: 10/08/2010
Posts: 293

Re: Clustering Ametys Servers

the recommended architecture is to have one tomcat per application, so you're right

Offline

#9 24/03/2018 08:04:33

srini_r
Guest
Registered: 06/02/2018
Posts: 41

Re: Clustering Ametys Servers

hi cedric,

i tried deploying only the CMS application in ne tomcat and only the site application in another tomcat, but the site application is not working. I think, inherently the site application depends upon many components bundled in the cms application, including the plugins. so, it seems that we need to deploy both the applications across all the server instances, but prevent the access of CMS from all, but one tomcat instance. let me try it that way

Offline

#10 24/03/2018 15:57:15

Cédric Damioli
Ametys Product Manager
From: Toulouse
Registered: 10/08/2010
Posts: 293

Re: Clustering Ametys Servers

I don't think you've understood the Ametys architecture : the site application is basically a caching proxy for the CMS application. All the business logic, all the plugins stuff  is computed on the CMS side and then sent to the site.
If you deploy more than one CMS application wihtout clustering it, it just can't work.

Please begin with only one CMS and one site application.
Why is the site "not working" ?

Offline

#11 25/03/2018 09:44:26

srini_r
Guest
Registered: 06/02/2018
Posts: 41

Re: Clustering Ametys Servers

Hi cedric,

The site application was throwing a "oops. are you lost" kind of a message. then i checked the AR files and understood that both the WAR files are needed since most of the components/logic is in the CMS module. thanks for validating the same. But, there was not ,much of information in the log files of site application either.

now, i have deployed both the applications in the tomcat and it is working properly with one server. i will test  it with multiple servers after i do a load testing and check whether this setup itself is enough since you were talking about the caching techniques that is available.

Offline

Board footer

Powered by FluxBB