Clustering Tomcat in 2 minutes using Tcat and Terracotta


Last week, we did a webinar with on scaling and managing your web applications running on Tomcat. During the webinar, I did a short demo that showed a Terracotta profile, which makes it super easy to setup the environment required for web applications that use HTTP session using Terracotta.

I previously blogged about how to create a server profile and apply it to servers here. In this case, I created a Terracotta profile in just minutes with Tcat Server.

Basically, creating a Terracotta profile involved the following steps:

1. Create a workspace under repository, call it ‘Terracotta Files’

2. Create a sub workspace under ‘Terracotta Files’ and call it ‘lib’ ( all sub workspaces under root workspace should reflect your desired structure on remote Tomcat server – in this case, we want to get a terracotta lib file under the lib directory in remote Tomcat server).

3. Upload the terracotta-sessions-1.0.0.jar to the lib workspace

4. Create a server profile – call it terracotta profile ( Admin tab in Tcat Server )

6. Select ‘Terracotta Files’ as the workspace on left hand side of the panel.

7. Save the profile

8. Apply the profile to the remote Tomcat server instances that you want to deploy your web applications to

That’s it – takes less than 2 minutes to do and you have a profile that you can apply to any Tomcat servers  as you need to.  If you want to watch how to do it, here is a screencast of the demo from the webinar:

Tcat Server is free for use in development environments, download it here.

We'd love to hear your opinion on this post