Abb
Abb

Reputation: 1

How to throttle/limit resources of webapps in Tomcat?

I run several instances of the same webapp in Tomcat. I need to limit the

  1. total bandwidth

  2. memory

  3. storage

used by each instance (webapp) in tomcat. Is there a way to do that in tomcat? If yes, how?

Thanks for your response.

Upvotes: 0

Views: 4799

Answers (1)

mindas
mindas

Reputation: 26713

  1. Bandwidth - see this SO post. It only allows throttling based on request count (and not bandwidth) but still better than nothing.

  2. I'm afraid this is not possible as you are running multiple webapps under the same JVM. There are some papers elaborating this should be possible if you use OSGi but I don't believe it is anywhere close to production-ready.

  3. You are much better off achieving this using OS disk quotas rather than programmatically.

Upvotes: 1

Related Questions