Oracle by Example brandingCreate a Basic Cluster

section 0Before You Begin

This 15-minute tutorial shows you how to use the Oracle WebLogic Server Administration Console to configure a basic cluster in Oracle WebLogic Server.

Background

A WebLogic Server cluster consists of multiple Managed Servers running simultaneously, executing the same applications, and working together to provide increased scalability and reliability. A cluster appears to a client as a single WebLogic Server instance. You use a cluster to take advantage of workload balancing and failover capabilities that are not available with a single Managed Server. The Managed Servers that make up a cluster run on one machine or more different machines. You can scale up a cluster easily, by adding additional Managed Servers to the cluster either on the same machines or by adding additional machines. A cluster support load balancing of workload by letting you run objects on multiple server instances. The cluster then maintain copies of those objects and distributes load accordingly. In addition, you can specify a load-balancing algorithm to control how the cluster balances the workload. You can also cluster objects such as servlets, JSPs, EJBs, JMS destinations, and JDBC connections.

This tutorial is part of the Oracle WebLogc Server 12c series, and assumes that you have completed these tutorials, in this order:

What Do You Need?

  • An installation of Oracle WebLogic Server 12c. See http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html
  • An instance of WebLogic Server installed in /u01/app/fmw.
  • A properly configured WebLogic Server domain containing an Administration Server and three Managed Servers. This tutorial uses domain /u01/domains/ExampleDomain with Managed Servers server1, server2, and server3.
  • Node Manager running and configured as follows:
    • machine1 containing server1 and server2
    • machine2 containing server3
  • Domain Administrator credentials: The user name and password you specified when you created the domain.

section 1Create a Cluster of Existing Managed Servers

To create a cluster of existing Managed Servers:

  1. Ensure that the Administration Server is up and running. Open a web browser and enter the WebLogic Server Administration console URL:
    http://localhost:7001/console
    Specify the host name and port of your domain's Administration Server in place of localhost:7001.
  2. Enter your administrator credentials.
    The home page of WebLogic Server Administration Console displays.
  3. Under Domain Structure, expand Environment and select Servers.
    Domain Structure
    Description of the illustration under_domain_struct.png
  4. On the Summary of Servers page, select Control. If any of the Managed Servers are in the RUNNING state, shut them down.
  5. Click Yes to confirm the force shutdown. Click Refresh refresh icon and ensure that all the Managed Servers are in the SHUTDOWN state.
  6. In the Change Center, click Lock & Edit.
    To create a cluster or change the domain's configuration, you must first lock the configuration to prevent changes from other users during your edit session.
  7. Under Domain Structure, expand Environment and select Clusters.
  8. In the Clusters table, click New, and then select Cluster.
  9. On the Create a New Cluster page, enter the cluster properties:
    • Name: cluster1
    • Messaging Mode: Unicast
    Click OK.
    Create Cluster
    Description of the illustration create_cluster_screen.png
  10. To add a server to the cluster:
    • In the Clusters table, select cluster1 (the newly created cluster).
    • On the Settings for cluster1 page, select Configuration, and then Servers.
    • In the Servers table, click Add.
  11. On the Add a Server to Cluster page, select the Managed Servers.
    • Select the option to add an existing server to the cluster and choose the Managed Server server1 from the drop-down list.
    • Click Finish.
    Add Server
    Description of the illustration add_server_finish.png
  12. Repeat steps 10 and 11 to add the Managed Servers server2 and server3 to the cluster.
  13. In the Change Center, click Activate Changes.
    The Console displays the message: All changes have been activated. No restarts are necessary.

section 2Start the Clustered Servers

To start the Managed Servers in a cluster:

  1. For each machine where Managed Servers are to be started, ensure that the Node Manager is configured properly and is in the Reachable state.
    • In the left pane of the Console, expand Environment and select Machines.
    • Select the name of the machine where you want to view the Node Manager status.
    • On the Settings for Machine page, select Monitoring and then Node Manager Status.
      Monitor Node Manager
      Description of the illustration monitor_node_manager.png
  2. In the WebLogic Server Administration Console, under the Domain Structure, select Clusters.
  3. In the Clusters table, select cluster1 (the newly created cluster).
  4. On the Settings for cluster1 page, select Control.
    You can view all the Managed Servers added to the cluster.
  5. In the Managed Server Instances in this Cluster table, select the Managed Servers that are in the SHUTDOWN state.
    Start Managed Server
    Description of the illustration start_servers.png
  6. Click Start and confirm to continue.
    The selected Managed Servers start. Click Refresh refresh icon and ensure that all the Managed Servers are in the RUNNING state.

section 3Monitor the Cluster

To monitor the cluster using the WebLogic Server Administration Console:

  1. In the Administration Console, under the Domain Structure, select Environment and then Clusters.
  2. In the Clusters table, select cluster1 (the newly created cluster).
  3. On the Settings for cluster1 page, select Monitoring and then Summary.
  4. The Server Status table under Summary shows all the Managed Servers that are currently participating in the cluster. To see more information about the servers in the table, click Customize this table and add the columns to the table that you want to display.
    For example, to display the current heap size for the Managed Servers in the table, select Heap Size Current and move it to the Chosen column. Then, click Apply.
    Monitor Cluster
    Description of the illustration monitor_details.png

more informationNext Steps

The WebLogic Server 12c collection contains a number of additional tutorials, covering a variety of topics. See the WebLogic Server 12c collection here for additional topics and content.