Shared JEE Containers
Shared JEE Containers
Shared JEE Containers
6 March 2009
Standard app deployment is based on the App Server
architecture specified in the JEE specifications
Application Server
• Runtime containers, protocols and other architectural components are mostly standardized
by the Java Enterprise specification from Sun Microsystems Inc.
Production systems employ multiple App Server
instances for redundancy, giving excess capacity
Machine 1
App App
DMZ Machine 1 Server Server …
HTTP
Server
Machine 2
Load Balancer
App App
DMZ Machine 2 Server Server …
HTTP
Server
• For production systems (with scalability, failover, etc. requirements) you need more than
one App Server instance.
Machine 1
Machine 3
App App
DMZ Machine 1
Machine 5
App
Server
App
Server …
HTTP Machine 7
App
Server
App
Server …
Server
App
Server
App
Server …
Load Balancer Server Server … Machine 2
Machine 4
App App
DMZ Machine 2
Machine 6
App
Server
App
Server …
HTTP Machine 8
App
Server
App
Server …
Server
App
Server
App
Server …
Server Server …
Internet DMZ Intranet
One Application Server could host multiple applications, but often this is not the case.
Many times different applications do not even share machines.
Result:
• a huge number of machines
• most of them running with very low utilization most of the time
Big Idea – Shared Containers
• Create one large resource pool that can be used across multiple
JEE applications in a manner that does not increase risk to the
application or reduce performance
Some new concepts have to be introduced into the
overall architecture to implement the Big Idea
• Define rules for the situation that there are not enough resources for
all applications
– Prioritize requests
How can sharing occur?
• The next slides are intended to illustrate various ways that two JEE
applications can be hosted
High
Physical
Isolation
OS
Infrastructure Required
Virtualization
Progression
is assumed
to be non-
linear; Actual
TCO curve
has not been
computed
Dedicated
JVM per
App
Physical Isolation (current problem)
Scenario
• No sharing - Each application has its own
Physical Server, OS, WLS License, and
JVM.
Advantages
Physical Server Physical
• Server
Complete isolation, immune from anything
OS OS happening with the other application
• OS and JVM can be tuned to the
WLS License WLS License
application
JVM JVM
Disadvantages
App 1 App
•
2
Complete isolation comes at high cost
– Separate hardware
– Separate software licenses
• Often runs at low levels of utilization
JEE Container Scenarios
High
Physical
Isolation
OS
Infrastructure Required
Virtualization
Progression
is assumed
to be non-
linear; Actual
TCO curve
has not been
computed
Dedicated
JVM per
App
OS Virtualization (current solution)
Scenario
Physical Server
• Both applications share a Physical Server
Guest OS • Each application is isolated in its own OS
WLS License
Advantages
JVM • Reduces hardware costs
• Appears to application to be the same as
App 1 physical isolation
• Full range of tuning parameters
• OS container can be moved between
physical servers
Disadvantages
• Added cost of Hypervisor software and
Guest OS
management
WLS License • Software has to be licensed for each OS
JVM
App 2
JEE Container Scenarios
High
Physical
Isolation
OS
Infrastructure Required
Virtualization
Progression
is assumed
to be non-
linear; Actual
TCO curve
has not been
computed
Dedicated
JVM per
App
Dedicated JVM per App
Scenario
Physical Server • Both applications share a Physical Server,
WLS License, and OS
OS • Each application is isolated in its own JVM
Advantages
WLS License • Low tech
• Minimizes hardware and license costs
JVM • A rogue app in one JVM cannot affect the
other app
• JVMs can be tuned to the application
App 1
Disadvantages
• Each JVM has physical memory
requirements which limit how many JVMs
can be created
• Difficult to tune to app SLA as each app acts
JVM independent on shared machine
• Change control notifications/approvals can
become an issue
App 2
JEE Container Scenarios
High
Physical
Isolation
OS
Infrastructure Required
Virtualization
Progression
is assumed
to be non-
linear; Actual
TCO curve
has not been
computed
Dedicated
JVM per
App
Shared JVM for many Apps
Scenario
Physical Server • Both applications share a common JVM,
WLS License, OS, and Physical Server
OS Advantages
• Best suited for development
WLS License • Can run on small hardware with limited
memory
• Minimum cost solution
JVM
Disadvantages
• Performance of one app can affect the
App 1 •
other
CPU allocated to JVM thread,
performance affected by traffic to the app
• One app can corrupt JVM, which would
cause outage for other app upon JVM
restart
App 2 • Change control notifications/approvals can
become an issue
Inhibitors to adoption of shared containers
Scenario
Physical Server
• Both applications share a Physical Server,
OS WLS License, and OS
• Each application is isolated in its own JVM
WLS License • Traffic to applications is throttled by on-
demand router according to SLA policies
JVM
Advantages
App 1 • Minimizes hardware and license costs
• A rogue app in one JVM cannot affect the
other app
Agent • Ability to tune to app SLA as policies dictate
resource consumption priorities
• Drives higher levels of machine utilization
JVM Disadvantages
• SLA priorities need to be negotiated between
App 2 app stakeholders
• Change control notifications/approvals can
become an issue
Agent • Added cost of “Virtual Enterprise” router
IBM Virtual Enterprise introduces an On Demand
Router (ODR) into the architecture
On Demand Router (ODR) prioritizes requests and
balances load according to service policies
High availability Restart VM instances on alternate hosts Ensure that a minimum number of dynamic
when a host failure is detected cluster instances are always running
Reliability Cluster monitoring with visual alerts, Health monitoring of application servers with
determined by HA and capacity, and automatic correction or rerouting
manual operator intervention
Admission controlCheck the capacity requirements of the •Manage workload traffic
VM against the available capacity of the •Ensure that the node has capacity to run the
pool application server
Possible Next Steps