Les 16-Configure Cluster

Embed Size (px)

Citation preview

  • 8/2/2019 Les 16-Configure Cluster

    1/28

    Copyright 2009, Oracle. All rights reserved.

    Configuring a Cluster

  • 8/2/2019 Les 16-Configure Cluster

    2/28

  • 8/2/2019 Les 16-Configure Cluster

    3/28

    Copyright 2009, Oracle. All rights reserved.1 6 - 3

    Road Map

    Preparing for a cluster

    Cluster architecture

    Network and security topology

    Machines

    Names and addresses

    Configuring a cluster

  • 8/2/2019 Les 16-Configure Cluster

    4/28

    Copyright 2009, Oracle. All rights reserved.1 6 - 4

    Preparing Your Environment

    Before you configure a cluster, you need to prepare your

    environment.

    Determine your cluster architecture.

    Understand your network and security topologies.

    Choose the machines for the cluster installation.

    Identify IP addresses or DNS names, and port numbers for

    the server instances in the cluster.

    For proxy architectures, you could have:

    A single firewall between untrusted clients and the Webserver layer

    A firewall between the proxy layer and the cluster

    Configure the Node Manager

  • 8/2/2019 Les 16-Configure Cluster

    5/28

    Copyright 2009, Oracle. All rights reserved.1 6 - 5

    Hardware

    You can set up a cluster on a single computer for

    demonstration or development.

    This is not practical for production environments.

    Each computer involved in a cluster should have a static IP

    address. There is no built-in limit for the number of server instances

    in a cluster.

    Large multiprocessor servers can host clusters with

    numerous servers.

    The recommendation is one server instance for every twoCPUs.

  • 8/2/2019 Les 16-Configure Cluster

    6/28

    Copyright 2009, Oracle. All rights reserved.1 6 - 6

    IP Addresses and Host Names

    The IP address and host name information is needed for

    configuring and managing:

    The administration server

    Managed servers

    Multicast communication For a production environment, use the host name resolved

    at DNS rather than IP addresses.

    Firewalls can cause IP address translation errors.

    Each server should have a unique name.

    The multicast address should not be used for anything

    other than cluster communications.

  • 8/2/2019 Les 16-Configure Cluster

    7/28

    Copyright 2009, Oracle. All rights reserved.1 6 - 7

    Cluster Address

    The cluster address is used to communicate with entity

    and session beans by constructing the host name portion

    of the request URLs.

    You can explicitly define the address of a cluster.

    The cluster address should be a DNS name that maps to theIP addresses or DNS names of each Oracle WebLogic

    Server instance in the cluster.

    You can also have Oracle WebLogic Server dynamically

    generate an address for each new request.

    Minimizes configuration Ensures an accurate cluster address

    The dynamic cluster address is created in the form of:

    listenaddress1:listenport1,listenaddress2:liste

    nport2,listenaddress3:listenport3

  • 8/2/2019 Les 16-Configure Cluster

    8/28

    Copyright 2009, Oracle. All rights reserved.1 6 - 8

    Road Map

    Preparing for a cluster

    Configuring a cluster

    Administration Console

    Configuration Wizard

    WLST

    Ant

  • 8/2/2019 Les 16-Configure Cluster

    9/28

    Copyright 2009, Oracle. All rights reserved.1 6 - 9

    Methods of Configuring Clusters

    There are multiple ways to create and configure an Oracle

    WebLogic Server cluster:

    Configuration Wizard

    Administration Console

    WebLogic Scripting Tool (WLST)

    Java Management Extensions (JMX)

    WebLogic Server API

  • 8/2/2019 Les 16-Configure Cluster

    10/28

    Copyright 2009, Oracle. All rights reserved.16 - 10

    Creating a Clusterby Using the

    Administration Console

    1

    3

    4

    6

    2

  • 8/2/2019 Les 16-Configure Cluster

    11/28

    Copyright 2009, Oracle. All rights reserved.16 - 11

  • 8/2/2019 Les 16-Configure Cluster

    12/28

    Copyright 2009, Oracle. All rights reserved.16 - 12

    Setting Cluster Attributes

  • 8/2/2019 Les 16-Configure Cluster

    13/28

    Copyright 2009, Oracle. All rights reserved.16 - 13

    Configuring Cluster Communication

    Number of missed heartbeatsbefore failure is assumed

    For Multicast: Number of network

    hops (subnets) that a message is

    allowed to travel

  • 8/2/2019 Les 16-Configure Cluster

    14/28

    Copyright 2009, Oracle. All rights reserved.16 - 14

    Adding Cluster Members: Option 1

    1

    23

  • 8/2/2019 Les 16-Configure Cluster

    15/28

    Copyright 2009, Oracle. All rights reserved.16 - 15

    Adding Cluster Members: Option 2

    1

    2

    3

  • 8/2/2019 Les 16-Configure Cluster

    16/28

    Copyright 2009, Oracle. All rights reserved.16 - 16

    Creating a Cluster with the Configuration Wizard

  • 8/2/2019 Les 16-Configure Cluster

    17/28

    Copyright 2009, Oracle. All rights reserved.16 - 17

    Clusters and the Configuration Wizard

  • 8/2/2019 Les 16-Configure Cluster

    18/28

    Copyright 2009, Oracle. All rights reserved.16 - 18

    Clusters and WLST

    connect('myuser','mypass','myhost:7001')

    edit()

    startEdit()

    cd('/')

    cmo.createCluster('HRWebCluster')

    cd('/Clusters/HRWebCluster')cluster = getMBean('/Clusters/HRWebCluster')

    cd('/Servers/serverA')

    cmo.setCluster(cluster)

    cd('/Servers/serverB')

    cmo.setCluster(cluster)

    cd('/Servers/serverC')

    cmo.setCluster(cluster)

    activate()

    disconnect()

    exit()

    Create a new

    cluster.

    Assign cluster members.

  • 8/2/2019 Les 16-Configure Cluster

    19/28

    Copyright 2009, Oracle. All rights reserved.16 - 19

    Creating a Cluster Using the Cluster MBean

    The Cluster MBean is used to create a cluster by using Ant

    or command-line tools.

    Configuring the cluster from the command line requires the

    combined use of Cluster and Server MBeans.

    To create new clusters within a domain, use: weblogic.management.configuration.ClusterMBean

  • 8/2/2019 Les 16-Configure Cluster

    20/28

    Copyright 2009, Oracle. All rights reserved.16 - 20

    Synchronization When Starting Servers in a

    Cluster

  • 8/2/2019 Les 16-Configure Cluster

    21/28

    Copyright 2009, Oracle. All rights reserved.16 - 21

  • 8/2/2019 Les 16-Configure Cluster

    22/28

    Copyright 2009, Oracle. All rights reserved.16 - 22

    ConfiguringOHS as ProxyServer

    To effectively use the load balancing and failover features,

    you should configure a proxy.

    You can configure OHS as the proxy by:

    Including configuration directives in httpd.conf

    Creating another file with directives and setting an includedirective in httpd.conf

    The WebLogicCluster directive is the most importantmod_wl_ohs for a cluster.

    You specify the list of host names of the managed servers

    with their ports in the WebLogicCluster directive.

    If you add or remove members to or from this list, you may

    have to restart OHS.

  • 8/2/2019 Les 16-Configure Cluster

    23/28

    Copyright 2009, Oracle. All rights reserved.16 - 23

    Starting and Stopping OHS Manually

    To give effect to configuration changes to httpd.conf,

    you should restart OHS.

    The processing life cycle for OHS is managed by Oracle

    Process Manager and Notification Server (OPMN).

    The command-line interface to OPMN is opmnctl. To restart OHS, use the following command:

    You can also stop, and then start OHS.

    $> ./opmnctl restartproc process-type=OHS

    $> ./opmnctl stopproc process-type=OHS

    $> ./opmnctl startproc process-type=OHS

  • 8/2/2019 Les 16-Configure Cluster

    24/28

    Copyright 2009, Oracle. All rights reserved.16 - 24

    Verifying Access Through OHS

    Get the port on which OHS is running by using:

    $>./opmnctl status lProcesses in Instance: wtinst

    --------------+-------------+------+-------+-----------+-

    ---------+-----------+------------------------------

    ias-component | process-type| pid |status | uid | memused | uptime | ports

    --------------+-------------+------+-------+-----------+-

    ---------+-----------+------------------------------

    ohsa | OHS | 8614 | Alive | 1775979054|

    348736 | 0:00:29 | https:8889,https:4443,http:8888

  • 8/2/2019 Les 16-Configure Cluster

    25/28

    Copyright 2009, Oracle. All rights reserved.16 - 25

    Quiz

    Which of the following is NOT an available configuration

    attribute associated with Oracle WebLogic Cluster?

    1. Messaging mode

    2. Multicast TTL

    3. Multicast port

    4. Broadcast server

  • 8/2/2019 Les 16-Configure Cluster

    26/28

    Copyright 2009, Oracle. All rights reserved.16 - 26

    Summary

    In this lesson, you should have learned how to:

    Prepare your environment for a cluster

    Create and configure a cluster

    Add servers to a cluster

    Start up and shut down clustered servers

  • 8/2/2019 Les 16-Configure Cluster

    27/28

    Copyright 2009, Oracle. All rights reserved.16 - 27

    Practice 16 Overview:

    Configuring Clusters

    This practice covers the following topics:

    Creating a cluster

    Assigning two servers to the cluster

    Verifying the port and status of Oracle HTTP Server

  • 8/2/2019 Les 16-Configure Cluster

    28/28

    Copyright 2009, Oracle. All rights reserved.16 - 28