users@glassfish.java.net

Scaling up

From: Blake McBride <blake_at_arahant.com>
Date: Sun, 2 Feb 2014 19:37:08 -0600

Greetings,

I have a GWT application (written in Java) that I host on Glassfish that
uses Hibernate & PostgreSQL all on a Linux box. I don't know much about
scaling the application or deployment to support a lot of simultaneous
users so I though I would reach out to the glassfish community. For now, I
have everything running on a single machine. So, at this point I am only
looking to support as many users on the single machine as possible. Just
to give my understanding of scaling a number, let's say I want to support
300 simultaneous users.

I understand that each connection spawns a new Java (native) thread. That
shouldn't be a problem. 300 threads on top of the ones used by glassfish
and the OS shouldn't be a problem. Am I wrong?

What scares me is the database connections. My understanding is that each
connection creates it's own database connection. I understand there is
pooling of these going on but I doubt the pool will handle 300 connections.
 I think this is my potential problem. Am I wrong? What possible
solutions do I have?

I think my _only_ potential issues are RAM, CPU horsepower, number of
threads, and number of database connections. My opinion is that I should
be okay regarding the RAM, CPU, and thread count. Is there anything else I
should be worried about?

Ultimately I may scale to more machines if needed, but that will be another
matter.

I really appreciate any help you can offer.

Thanks.

Blake McBride