0% found this document useful (0 votes)
89 views30 pages

Websphere Clusters and Scalability

Uploaded by

Bi Bông
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views30 pages

Websphere Clusters and Scalability

Uploaded by

Bi Bông
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

WebSphere clusters and

scalability

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 9.1
Unit objectives
After completing this unit, you should be able to:
• Describe the static clusters and dynamic clusters
• Compare the benefits of vertical and horizontal scaling
• Explain the use of multiple processors for scalability
• Describe queuing considerations for vertical and horizontal scaling
• Describe the main features of Intelligent Management

© Copyright IBM Corporation 2016


Topics
• Application server clusters
• Intelligent Management

© Copyright IBM Corporation 2016


Application server clusters

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 9.1
Application server clusters
• Static cluster
– A static cluster is a group of application servers that participates in workload
management
– Workload management includes load balancing, scalability, and high availability
– Clusters enable enterprise applications to scale beyond the amount of
throughput that can be achieved with a single application server

• Dynamic cluster
– A dynamic cluster is a fundamental building block of the dynamic operations
environment
– You must configure dynamic clusters to get Intelligent Management functionality,
such as high availability and service policies
– The application placement controller starts and stops dynamic cluster members
when running in supervised or automatic mode
– Dynamic clusters are more scalable than static clusters

© Copyright IBM Corporation 2016


Using cluster configurations (1 of 3)
• The capability to spread workload among application servers by using
clustering can be a valuable asset in configuring highly scalable
production environments
– Often true when the application is experiencing bottlenecks that are preventing
full CPU utilization of Symmetric Multiprocessing (SMP) servers

• When adjusting the WebSphere system queues in clustered


configurations, remember that when servers are added to a cluster, the
database server downstream receives more load

© Copyright IBM Corporation 2016


Using cluster configurations (2 of 3)
• Two web containers within a cluster are located between a web server
and a data source
Cluster

Host computer A
50
HTTP server Cluster member 1
threads
Web container
Host
computer C

Database
Plug-in
server
Host computer B

Cluster member 2

100 Web container


50 Database
threads threads connections

© Copyright IBM Corporation 2016


Using cluster configurations (3 of 3)
• Consider the following queue configurations:
– Web server queue settings can be doubled to ensure that ample work is
distributed to each web container
– Web container thread pools can be reduced to avoid saturating a system
resource such as CPU or another resource that the servlets are using

• The data source can be reduced to avoid saturating the database


server

• Java heap parameters can be reduced for each instance of the


application server
– For versions of the JVM shipped with WebSphere Application Server, it is crucial
that the heap from all JVMs remains in physical memory
– If a cluster of four JVMs is running on a system, enough physical memory must
be available for all four heaps

© Copyright IBM Corporation 2016


Clustering: Vertical scaling
• Vertical scaling
– Provides process level failover
– Can improve throughput capacity Host computer A Node agent

Cluster

Cluster member
HTTP server 1

Plug-in

Cluster member
2
Plug-in
configuration

© Copyright IBM Corporation 2016


Clustering: Horizontal scaling
• Horizontal scaling
HTTP server
– Provides hardware
level failover Plug-in
– Improves throughput
Plug-in
configuration

Host Node agent


Host Node agent
computer A computer B

Cluster

Cluster member Cluster member


1 2

© Copyright IBM Corporation 2016


Clustering: Combined
Host computer A

• Horizontal and vertical scaling


Node agent
– Improved capacity and failover Cluster member
1
– Improved throughput

Cluster member
HTTP server 2

Cluster
Plug-in Host computer B

Cluster member
3
Plug-in
configuration
Cluster member
4
Node agent

© Copyright IBM Corporation 2016


Option to start application components dynamically
• You can improve system performance if you configure each cluster
member to start components dynamically as needed instead of letting
all components automatically start when the cluster member starts
– Improves cluster startup time and reduces the memory footprint of the cluster
members

• Starting components as they are needed is most effective if all of the


applications that are deployed on the cluster are of the same type
– Works better if all of your applications are web applications that use servlets and
JavaServer Pages (JSP)
– Works less effectively if your applications use servlets, JSPs, and Enterprise
JavaBeans (EJB)

© Copyright IBM Corporation 2016


Scaling with multiple processors
• Most systems today support multiple processors
– Known as SMP, symmetric multiprocessing
• More processor means more computing power
• In theory, more computing power means that an application server can
process more requests
• Verify that your system kernel supports SMP
– For UNIX and Linux, use the uname –a command
– Look for the SMP

[root@hostA ~]# uname -a


Linux hostA 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01
EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

© Copyright IBM Corporation 2016


Clustering: Multiple processors
• A single JVM can drive multiple processors
– There are examples where a single JVM was able to drive a 64-way
machine
– Other examples where the throughput fell off after only four processors

• The optimal number of processors depends on the environment


and can vary greatly
– To determine what number of processors works best in your environment,
requires performance testing and analysis

© Copyright IBM Corporation 2016


Clustering best practices (1 of 2)
• The best values for your environment depend on your
configurations and the applications you are running

• The optimal number of physical processors for a set of JVMs is


about four
– For example, on a 12-way box: three JVMs can each use four processors

• Avoid large numbers of JVMs in a single logical partition


– Each JVM might require a significant amount of CPU capacity (over one
physical processor of CPU capacity)
– Large numbers of JVMs that require significant amounts of CPU capacity
drive the number of processors per logical partition beyond the optimal
number of processors per JVM

• Consider horizontal scaling instead of vertical scaling in cases


where large numbers of physical processors are required

© Copyright IBM Corporation 2016


Clustering best practices (2 of 2)
• Horizontal scaling
– Adding new logical partitions with new physical CPUs
– Scales linearly in most cases
– Note: the new logical partitions host new WebSphere instances

• Vertical scaling
– Adding WebSphere instances and new physical CPUs in existing logical
partitions
– Does not scale linearly at high numbers of physical processors (over 8)

• Consider the use of helper threads for garbage collection if the number
of logical processors that are assigned to the host logical partition is
high (over 8)
– Use the generic JVM argument -gcthreads
– The optimal number of garbage collection threads is about six

© Copyright IBM Corporation 2016


Intelligent Management

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 9.1
Intelligent management

Performance Health Application edition


Management management management
Self optimizing Self protecting
Self managing
Self healing

App App
version version
1.0 2.0

Intelligent routing

© Copyright IBM Corporation 2016


Performance Management

Intelligent management
A B C Node 1
Request flow
management Node 2
services A B C

Routing that is Node 3


based on
A B C
business policies
Node 4
A B C

Resource management
services
• Makes sure that resources are
available when needed
• Starts and stops servers
automatically
• Key service Application placement
controller

© Copyright IBM Corporation 2016


Health management
Node 1
Monitors the whole cell
•Nodes Node 2
Health 1
•Clusters
controller …
•Servers
•… Node n

Node 1
Detects a sick server
Health •Excessive response time Node 2
2
controller •Excessive memory usage
•Excessive garbage collection …
Node n

Node 1
Runs recovery actions
Health •Take thread dump Node 2 3
controller •Restart server

•…
Node n
© Copyright IBM Corporation 2016
Intelligent routing
• A routing tier that is aware of what is happening on the application
server tier
– Knows which cluster members are currently started
– Knows application server usage, performance, and other statistics
– Understands service policies
– Routes work to the application server that can do it best
– Can route to multiple application editions
– Provides preference for higher priority requests (some restrictions)
– Provides processor and memory overload protection (some restrictions)

• Integrates with Performance Management, health management, and


application edition management

© Copyright IBM Corporation 2016


Dynamic clusters (1 of 2)
• A dynamic cluster is a server cluster that uses weights and workload
management to balance the workloads of its cluster members
dynamically
– Based on performance information that is collected from the cluster members

• A dynamic cluster is an application deployment target that can expand


and contract as a result of the workload in your environment
– Dynamic clusters work with autonomic managers, including the application
placement controller and the dynamic workload manager to maximize the use of
your computing resources

© Copyright IBM Corporation 2016


Dynamic clusters (2 of 2)
• Similar to a static cluster, but number of active servers can be resized
dynamically at run time
– The number of active instances depends on business policies and current
request flow
– Managed by the Application placement controller

Dynamic Dynamic
cluster cluster
A dynamic cluster member
Node 1 Node 1
is started dynamically
to meet demand
Node 2 Node 2

Node 3 Node 3

Node 4 Node 4

© Copyright IBM Corporation 2016


Autonomic managers and services
• Application placement controller
– Decides when and where to start dynamic cluster members
• Autonomic request flow manager
– Classifies incoming requests and monitors performance
• Dynamic workload management controller
– Adjusts server weights for dynamic routing
• Health controller
– Monitors health policies and acts to correct problems
• On-demand configuration service
– Maintains cell topology information and keeps the other controllers informed
about the environment

© Copyright IBM Corporation 2016


Unit summary
Having completed this unit, you should be able to:
• Describe the static clusters and dynamic clusters
• Compare the benefits of vertical and horizontal scaling
• Explain the use of multiple processors for scalability
• Describe queuing considerations for vertical and horizontal scaling
• Describe the main features of Intelligent Management

© Copyright IBM Corporation 2016


Checkpoint questions
1. True or False: A static cluster is a group of application servers that
participates in workload management.
2. True or False: Vertical scaling always increases throughput.
3. True or False: Use the generic JVM argument -gcthreads to
specify the number of helper threads.
4. True or False: Performance Management provides two services,
health and application edition management.

© Copyright IBM Corporation 2016


Checkpoint answers
1. True
2. False: Vertical scaling might not increase throughput if system
resources are exhausted.
3. True
4. False: The two services Performance Management provides are
Request Flow Management and Resource Management.

© Copyright IBM Corporation 2016


Exercise 11

Load testing an application server


cluster

© Copyright IBM Corporation 2016


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 9.1
Exercise objectives
After completing this exercise, you should be able to:
• Install the DayTrader Application to a cluster
• Configure the IBM HTTP plug-in to route requests to the cluster
• Use Apache JMeter to load test the cluster
• Use the Apache server-status tool to monitor web server usage
• Monitor CPU usage on cluster member hosts
• Reconfigure cluster member weights to make better use of system
resources

© Copyright IBM Corporation 2016


Exercise environment
• Horizontal cluster with the DayTrader application deployed

TradeCluster HostB

TradeServer1
DayTrader
HostA application
HTTP server

HostC

TradeServer2
DayTrader
application
Plug-in
configuration
DB2 server

tradedb

© Copyright IBM Corporation 2016

You might also like