My network engineer states I am part of a cluster where two apache application servers(512G RAM each) have 142 instances each of Tomcat (of which my company represents 6 each with 2G RAM). This seems like a lot and my latency issues move with the hour of the day – 7AM CST software functions fine, 10AM CST – system slows significantly this slowness continues until 6PM CST. My question is how many Tomcat instances can one application server handle?
Tomcat – How many Tomcat instances can one application server handle
tomcat
Best Answer
It depends. At one end of the scale I have seen a 1GB RAM, 2-core pizza box server handle several thousand concurrent requests with barely a sign that the CPU is actually doing anything. That was a very well written application. At the other end, I have seen rack after rack of fairly expensive servers (16GB+ RAM, 4+ cores) handling traffic for a site because the app is so badly written if a server has to handle more than 5 concurrent requests the app falls over.
All that said, it certainly sounds like you have a capacity issue.
If it is memory related then the JVMs may start swapping and that will slow them down to a crawl.
My guess is that it is CPU related. It isn't hard for a badly written app to burn through a huge amount of CPU with very few requests.
There is a chance it is network related. With that many instances you might be serving enough content to saturate the network but I'd expect a different failure mode (e.g. dropped connections) rather than general slowness.