adam bien's blog

130.000 HTTP Sessions With -Xmx512m--A Scalability PoC 📎

Can Stateful Applications Scale?

Sometimes the question is answered with "No" (without any testing), and trivial, but stateless, enterprise applications for a few users are built with a significant overhead.

In the following screencast, I created with the pace of 500 HTTP sessions per second as many HTTP sessions as only possible in a trivial PoC. A HTTP session consists of a SessionScoped backing bean and a Stateful Session Bean with three attributes. A stateful Boundary in addition to a SessionScoped backing bean in this context does not make any sense, but wastes more memory and therefore shortens the screencast :-)

[See also an in-depth discussion in the "Real World Java EE Patterns--Rethinking Best Practices" book (Second Iteration, "Green Book"), page 50, chapter "The Extended Mode and Concurrency"], page 91 in chapter "Gateway", and page 429 in chapter "The Essential Complexity of Domain-Driven Designs".

See also other screencasts at: http://tv.adam-bien.com or subscribe to http://www.youtube.com/user/bienadam.

See you at Java EE Workshops at MUC Airport (March 25th-28th)!