users@glassfish.java.net

Re: Scaling up

From: Steven Siebert <smsiebe_at_gmail.com>
Date: Sun, 2 Feb 2014 21:05:41 -0500

Each request does not spawn a new thread...read up on java nio.

Similarly, each request does not spawn a new db connection, read up on
connection pooling.

The nice thing about app servers like gf is that it handles things like
this for you. 300 simultanious users is not much at all, but it very much
depends on what your business logic is doing, how it is written, etc etc.
The only way to tell if it can handle that load is to test it under that
load.

Scaling an ee5/6/7 application can be done in many different ways, it
really depends on your application. You really just have to see how it
works under your expected load.

S
On Feb 2, 2014 8:38 PM, "Blake McBride" <blake_at_arahant.com> wrote:

> 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
>
>