+ All Categories
Home > Documents > WF3815V19_HA

WF3815V19_HA

Date post: 09-Apr-2018
Category:
Upload: luweinet
View: 223 times
Download: 0 times
Share this document with a friend

of 32

Transcript
  • 8/8/2019 WF3815V19_HA

    1/32

    Welcome to:

    Workload Management

  • 8/8/2019 WF3815V19_HA

    2/32

  • 8/8/2019 WF3815V19_HA

    3/32

    What is Workload Management (WLM)?

    Sharing requests across multiple Application ServersConfiguration options that improve:

    Performance improve response time for requests

    Scalability grow capacity as the number of users

    increasesLoad balancing allocate workload proportionately among

    available resources

    Availability applications are still available if a server fails

  • 8/8/2019 WF3815V19_HA

    4/32

    What can be Workload Managed?

    EJB

    Requests

    Servlet

    Requests

    App Server

    App Server

    WebContainer

    WebContainer

    App Server

    EJBContainer

    App Server

    EJBContainer

    App Server

    WebContainer

    JavaClient

    HTTP

    Requests

    HTTPServer

    Plugin

    LoadBalancer HTTP

    Server

    Plugin

    HTTP

    ServerPlugin

    HTTP(s)

    HTTP(s)

    IIOP

  • 8/8/2019 WF3815V19_HA

    5/32

    Clusters

    Clusters are a set of application servers having the same applications

    installed, and grouped logically for Workload Management

    Applications installed to the cluster are automatically distributed to

    the cluster members

    Creation of a ClusterCan use an existing server to become the first cluster member

    Additional cluster members are created from templates

    Cluster members are similar to V4 'Clones' in that they:

    Run the same applicationsShare workload

    Can be centrally administered

    Cluster members are different from V4 'Clones' in that:

    Changes to the template are NOT propagated to the cluster memberChanges to cluster members do not disassociate the cluster member

    Applications binaries are copied to the nodes during synchronization

  • 8/8/2019 WF3815V19_HA

    6/32

    What's Different from Previous Versions?

    WAS 3.5 Models and 4.0 Server Groups were ActiveTemplates

    Changes to the template were propagated to the Clones

    Installing applications required manual updating of

    application binariesWAS 5 uses 'passive template' concept

    Once a cluster member has been created, no changes to

    the template are propagatedInstalling applications - binaries are copied to the nodes

    during synchronization

  • 8/8/2019 WF3815V19_HA

    7/32

    Configurations: Vertical Scaling

    May provide better performance with multiple processors

    ClusterMember1

    WebContainer

    EJBContainer

    ClusterMember2

    WebContainer

    EJBContainer

    Node 1

    HTTP

    ServerPlug-in

    Cluster

    Node Agent

  • 8/8/2019 WF3815V19_HA

    8/32

    ClusterMember2

    WebContainer

    EJBContainer

    Node 2 Node Agent

    Configurations: Horizontal Scaling

    Supports machine failover

    HTTP

    ServerPlug-in

    ClusterMember1

    WebContainer

    EJBContainer

    Node 1

    Cluster

    Node Agent

  • 8/8/2019 WF3815V19_HA

    9/32

    ClusterMember1

    WebContainer

    EJBContainer

    ClusterMember2

    WebContainer

    EJBContainer

    Node 1 Node Agent

    Configurations: Vertical & Horizontal Scaling

    Performance and failover

    ClusterMember3

    WebContainer EJBContainer

    ClusterMember4

    Web

    Container

    EJB

    Container

    Node 2

    HTTPServer

    Plug-in

    HTTPServer

    Plug-in

    Cluster

    Node Agent

  • 8/8/2019 WF3815V19_HA

    10/32

    Creating a Cluster (1 of 3)

    In console, select Servers -> Clusters and click NewEnter Cluster name

    Check options

    Prefer Local (default)

    Create ReplicationDomain (optional)

    Select the first member

    (optional)Click Next

  • 8/8/2019 WF3815V19_HA

    11/32

    Creating a Cluster (2 of 3)

    Enter NameSelect node

    Set weight

    Check options:

    Generate UniqueHTTP ports (default)

    Create replication

    entry (optional)Select template:

    default template, or

    existing server

    Click Apply

    Repeat to create other

    cluster members

    Click Next

  • 8/8/2019 WF3815V19_HA

    12/32

    Creating a Cluster (3 of 3)

    Click FinishCluster is created

    Save

    Configuration copiedto nodes at next

    synchronization

    Regenerate the HTTP server plug-in

    Plug-in configuration generated on deployment managerCopy to HTTP servers

    Paths in file are relative to deployment manager installationEdit paths to be correct for the system

    Changes will be effective at the next reload, or when you re-start the HTTP server

  • 8/8/2019 WF3815V19_HA

    13/32

    Installing Applications to a Cluster

    Same steps as installing to base server except:

    select a Cluster as the target, rather than a server

  • 8/8/2019 WF3815V19_HA

    14/32

    Controlling a Cluster

    Start the cluster

    Start starts all servers together

    Ripplestart starts servers one at a time

    Status

    Started only if all servers are startedPartial Start if some servers are stopped

    M difi ti f Cl t

  • 8/8/2019 WF3815V19_HA

    15/32

    Modification of Clusters

    Use the Administrative console or wsadmin

    What can be changed in a Cluster?

    Cluster Member settings:Weights

    Prefer LocalInstall or update applications

    Application Server settingsCluster members are application servers and the normal application

    server settings can be modified

    After making changes:

    Save the configuration and resynchronizeRegenerate the HTTP Server plug-in and redistribute it

    B i WLM R t R ti

  • 8/8/2019 WF3815V19_HA

    16/32

    Basic WLM Request Routing

    Routing Decision Points

    Load BalancerRouting decision table stored

    internally

    Configured using NDAdmin toolMultiple intelligent routing options

    HTTP Server Plug-inRouting table part of plugin-cfg.xml

    Configured using Administrative Consoleor wsadmin scripting tool

    WLM-aware ClientIncludes Web Container, Java client, EJB

    Routing table supplied by name serverConfigured using Administrative Console

    or wsadmin scripting tool

    Options:Prefer Local - yes or no

    LoadBalancer

    HTTPServer

    Plugin

    HTTP(s)

    App Server

    WebContainer

    App Server

    EJB

    Container

    HTTP(s)

    IIOP

    W i ht d R ti E l

  • 8/8/2019 WF3815V19_HA

    17/32

    Weighted Routing Example

    Routing Table*

    14

    Server 1 Server 2Server 2

    Weight = 2

    Server 1

    Weight = 8EJBClient

    ORB

    WLMPlug-in

    HTTPServer

    Plug-in

    * HTTP Plug-in reduces to lowest common denominator.

    EJB WLM uses two tables for Prefer Local & Remote

    After: Server 1 Server 2

    0 requests 4 1

    1 request 3 1

    2 requests 3 0

    3 requests 2 04 requests 1 0

    5 requests 0 0

    Reset: 4 1

    No NEW Requests to App Server 2

    Ed C t F il

  • 8/8/2019 WF3815V19_HA

    18/32

    Edge Components Failover

    Load Balancer can be paired with a backup machine

    Topology is 'Active/Standby'

    One machine does all the work

    The other waits for a failure to begin handling routing

    LoadBalancer

    LoadBalancer

    HTTPServer

    Plugin

    HTTP(s)

    HTTP Server Failover

  • 8/8/2019 WF3815V19_HA

    19/32

    HTTP Server Failover

    Multiple HTTP servers provide coverage

    Load Balancer can route around a failed HTTP server

    HTTP Plug-in

    Every plug-in knows about all Web containers

    Session key contains address of serverSessions get properly routed

    Topology is 'Active/Active',

    with all HTTP servershandling load before failover

    HTTPServer

    Plugin

    LoadBalancer

    HTTPServer

    Plugin

    HTTP(s)

    App Server

    WebContainer

    HTTP(s)

    HTTPServer

    Plugin

    App Server

    WebContainer

    App Server

    WebContainer

    Web Container Failover

  • 8/8/2019 WF3815V19_HA

    20/32

    Web Container Failover

    HTTP Server Plug-in

    Detects Failure

    Marks Container as unavailable

    Tries next Cluster member in the Cluster

    What about in-flight sessions?Sessions may be persisted

    to database

    Sessions may be replicatedin memory

    HTTPServer

    Plugin

    App Server

    Web

    Container

    App Server

    EJB

    Container

    HTTP(s)

    IIOP

    App Server

    WebContainer

    App Server

    Web

    Container

    EJB Container Failover

  • 8/8/2019 WF3815V19_HA

    21/32

    EJB Container Failover

    Client code and ORB plug-in can route to next available

    cluster member

    Failure occurs before any work was initiated on the cluster

    member:

    ORB automatically re-routes EJB requestIf no other cluster member available, throws

    "NO_IMPLEMENT" exception

    Failure occurs after EJB method call initiated work:System exceptions are thrown

    Client needs to determine

    appropriate recovery actionRe-issue request, rollback transaction, etc.

    If "NO_IMPLEMENT" exception

    thrown, no recovery is possible

    App Server

    WebContainer

    App Server

    EJBContainer

    IIOP

    App Server

    EJBContainer

    App Server

    EJBContainer

    JavaClient

    Node Agent Failover

  • 8/8/2019 WF3815V19_HA

    22/32

    Node Agent Failover

    V5 clients need one Node Agent up for first call to name

    server

    These clients can use a list of name servers if multiple

    nodes are available in the topology

    The IOR contains the list of name server host and portsInteroperability

    V3 and V4 clients will work only when the specific Node

    Agent they connect to is aliveWebSphere-aware clients get "special treatment"

    WebSphere private information in the WLM

    TaggedComponentIncludes a complete description of the cluster's topology

    Secure and non-secure transport ports for all cluster members are

    included and can be used directly by the client ORB

    Support for Third-party Client ORB

  • 8/8/2019 WF3815V19_HA

    23/32

    Support for Third-party Client ORB

    WebSphere Application Server supplies "indirect IOR" to

    client ORB for EJB WLM

    According to the specs defined by CORBA's GIOP 1.4

    Indirect IOR points to the Node Agent

    Node Agent used to get "direct IOR" pointing to actualcluster member

    Failover Support

    Third-party ORB compliant with GIOP 1.4Request fails, ORB gets new IOR via indirect IOROther ORBs

    Less transparent recovery

    Likely to need to regain access to the object via create() or findBy...()

    Deployment Manager Failover

  • 8/8/2019 WF3815V19_HA

    24/32

    Deployment Manager Failover

    Deployment Manager failover not implemented

    Node Agents have copies of all configuration information

    Consequence of Deployment Manager failure:

    Unable to broadcast configuration changes to Node Agents

    Administrative Console unavailablewsadmin unavailable (unless directed to specific server)

    In short, you cannot change the master configuration

    Deployment Manager handles routing table 'masters'If the Deployment Manager is down, failed or stopped

    servers will still have routed requests

    Performance degradation is possible if Deployment

    Manager stays down

    HTTP Session Management

  • 8/8/2019 WF3815V19_HA

    25/32

    HTTP Session Management

    HTTP is a stateless protocol

    Sessions allow you to maintain state information across a

    series of HTTP requests from the same client.

    For example, maintain shopping cart until checkout.

    Java Servlet specification defines session managementprocess for Web applications

    Session Manager stores Session information, and sends

    client a unique Session ID through:Cookie in HTTP header, or

    URL rewriting in parameter on links or forms

    SessionID: 123:AWeb

    Client

    HTTP

    ServerPlug-in

    App Server A

    Web

    ContainerSessionID: 123:A

    Session Object

    SessionID: 123

    ServerID: ACustName: BobProductID: xyz

    Session Affinity

  • 8/8/2019 WF3815V19_HA

    26/32

    Session Affinity

    An application may retain state information for a users

    session in memory.

    Other servers in the cluster do not have this information.

    HTTP Server Plug-in routes subsequent Servlet requests

    consistently to same Application Server after Session createdUsing Server ID passed with Session ID in cookie or URL

    SessionID: 123:A

    HTTPServer

    Plug-in

    App Server A

    Web

    Container

    SessionID: 123

    ServerID: ACustName: Bob

    ProductID: xyz

    App Server B

    WebContainer

    WebClient

    Web

    Client

    SessionID: 456:B

    SessionID: 456

    ServerID: B

    CustName: Joe

    ProductID: abc

    Session Persistence

  • 8/8/2019 WF3815V19_HA

    27/32

    Session Persistence

    Session object cached in memory by server

    Session object will be lost if server fails

    Two methods to enable persistence

    Database

    Session objects persisted using JDBC data sourceDB2 included in WAS package for session persistence

    Memory-to-Memory replicationSessions copied to another server using WebSphere Internal

    MessagingMultiple topology models possible:

    Single Replica ('Buddy') N-way peer-to-peer

    Client/server (Dedicated replication server)Can specify when replication performed

    Data transfer between JVMs can be encrypted

    Better performance than database persistence

    WebSphere Internal Messaging

  • 8/8/2019 WF3815V19_HA

    28/32

    WebSphere Internal Messaging

    N-way Peer-to-Peer

    Client/server

    WebContainer

    WAS

    (Store)

    WebContainer

    WAS

    (Store)

    WebContainer

    WAS

    (Store)

    WebContainer

    WAS

    WebContainer

    WAS

    WAS

    (Store)

    WAS

    (Store)

    Session Configuration

  • 8/8/2019 WF3815V19_HA

    29/32

    Session Configuration

    Three levels:

    Web Container

    Application

    Web Module

    Database Persistence Configuration

  • 8/8/2019 WF3815V19_HA

    30/32

    Database Persistence Configuration

    Create database in DBMS

    Create data source: Resources > JDBC Providers

    Select Database in Distributed Environment Settings page

    Configure database settings

    Internal Messaging Configuration

  • 8/8/2019 WF3815V19_HA

    31/32

    g g g

    Create replication domain

    Can be created when creating clusterOr use: Environment > Internal Replication Domains

    Select Memory to Memory Replication in Distributed

    Environment Settings pageConfigure InternalMessaging settings

    Partitions allow serversto listen only onconfigured channelsNumber of partitions is

    configurableRecommendation:Use at least 10 partitionchannels per cluster

    Unit Summary

  • 8/8/2019 WF3815V19_HA

    32/32

    y

    Workload Management possible for:

    HTTP requests (using Load Balancer)

    Servlet requests (using plug-in)

    EJB requests (using plug-in to Object Request Broker)

    WAS V5 supports clusters of serversCluster members created from templates

    Server weights control distribution of requests

    Cluster can be started/stopped as a unitMany configurations (topologies) possible

    Vertical scaling to increase utilization of large machine

    Horizontal scaling for scalability and failover

    Session management enabled at Web Container, Applicationor Web module level

    Session affinity routes sessions requests to same server

    Session persistence via database or messaging