only thing tc Server clustering gives you is the ability for users not to lose sessions if an instance of tomcat goes down

ask yourself how big of a deal it is if your users lose their sessions when an outage occurs--if it's a big deal then you may need clustering

Starting Point

ubuntu 8.04.4 64-bit VM

vmware tools installed

64-bit sun jdk 1.6.0_21

will be installing tc Server, Hyperic, etc. on this clean image

tc Server Installation

don't run tc Server as root

create a tcserver user

owns the tc Server files

runs the tc Server processes

install to /usr/local/tcserver

Instance Naming and Port Numbering

think about this in advance--may wind up with 100s of instances

tc01, tc02, etc. as the instance name, then follow this for ports

example scheme for ports

1NN80 - http

1NN43 - https

1NN09 - ajp

1NN05 - shutdown (if used)

1NN69 - jmx

server and jvmRoute naming--consider linking server name to IP address, e.g. srvXXX-tcYY where XXX is the end of the IP address, YY is the tomcat instance number

1NN20 - cluster communication

DEMO: Installing tc Server

tc Server version names are e.g. apache-tomcat-6.0.29.A.RELEASE where the first part is the version of Tomcat, the "A" means it's the first release of tc Server based on that tomcat release

if shutdown port is disabled, doing a kill -15 does a graceful shutdown. kill -9 works too and tomcat won't care, though your application might, so only do -9 if you have to

created two instances of tc Server using the tc Server create instance script

tc Server comes with templates for startup scripts--copy these over to /etc/init.d and edit as needed

paramterize cluster addresses and ports in a catalina properties file

can use ${...} notation in server.xml to hit the properties in catalina.properties

Creating a Cluster

switching to static node membership

cumbersome for large clusters

remove the <Membership .../> element

need to add a bunch of config stuff after the <Interceptor .../> elements

easier to use dynamic node discovery

backup strategies -- tomcat gives you DeltaManager and BackupManager

delta manager is simplest--replicates every session to every node in the cluster

if your sessions use a lot of memory, delta manager doesn't give you much scalability

if your limitation is CPU, delta manager gives you some scalability

amount of network traffic on delta manager increases with the square of the number of nodes--not terribly scalable

backup manager

replicates session data to one other node in the cluster

send options: synchronous vs. asynchronous

in synchronous, writes session changes to other nodes, waits for acknowledgement, and then sends response to the user. can mean a lag for the user.

asynchronous -- changes to sessions are put on a queue and the user gets the response immediately. means there's a chance that the cluster will be in an inconsistent state. use of sticky sessions means the consistency of the cluster doesn't really matter.

because java thread running isn't deterministic, in asynchronous mode the session updates may not be processed in the same order in which they were placed on the queue, so if your application depends on these being processed in the same order this is a risk

no need for the WAR farm deployer -- hyperic does this better

WAR farm deployer has been removed from tc Server

backup manager DOES know where the primary and backup nodes ARE for every session

i.e. it doesn't actually store all the sessions from all nodes, but it knows where to get the session it lost

backup manager scales much better than delta manager in both memory and network traffic

Comments

Popular posts from this blog

This is a first for me since under normal circumstances we run all our Django applications on Linux with Nginx, but we're in the process of developing an application for another department and due to the requirements around this project, we'll be handing the code off to them to deploy. They don't have any experience with Linux or web servers other than IIS, so I recently took up the challenge of figuring out how to run Django applications on Windows Server 2012 with IIS.

Based on the dated or complete lack of information around this I'm assuming it's not something that's very common in the wild, so I thought I'd share what I came up with in case others need to do this.

If you follow me on Google+ you'll know I had a recent rant about Windows Media Center, which after running fine for about a year suddenly decided as of January 29 it was done downloading the program guide and by extension was therefore done recording any TV shows.

I'll spare you more ranting and simply say that none of the suggestions I got (which I appreciate!) worked, and rather than spending more time figuring out why, I decided to try something different.

NextPVR is an awesome free (as in beer, not as in freedom unfortunately ...) PVR application for Windows that with a little bit of tweaking handily replaced Windows Media Center. It can even download guide data, which is apparently something WMC no longer feels like doing.

Background
I wound up going down this road in a rather circuitous way. My initial goal for the weekend project was to get Raspbmc running on one of my Raspberry Pis. The latest version of XBMC has PVR functionality so I was anxious to try that out as a …

My setup for my day job these days is a Surface Pro 4 and either an LG 34UC87M-B or a Dell P2715Q monitor, depending on where I'm working. This is a fantastic setup, but some applications have trouble dealing with the high pixel density and don't scale appropriately.
One case in point is Skype for Business. For some reason it scales correctly as I move between the Surface screen and the external monitor when I use the Dell, but on the LG monitor Skype is either massive on the external monitor, or tiny on the Surface screen.
After a big of digging around I came across a solution that worked for me, which is to change a setting in Skype's manifest file (who knew there was one?). On my machine the file is here:
C:\Program Files\Microsoft Office\Office16\LYNC.EXE.MANIFEST
And the setting in question is this:<dpiAware>True/PM</dpiAware>
Which I changed to this:
<dpiAware>False/PM</dpiAware>
Note that you'll probably have to edit the file as administr…