Setting up WebLogic Clusters 10-5
request. Allowing WebLogic Server to dynamically generate the cluster address is simplest, in terms of system administration, and is suitable for both development and
production environments.
10.1.5.6.1 Dynamic Cluster Address If you do not explicitly define a cluster address
when you configure a cluster, when a clustered server instance receives a remote request, WebLogic Server generates the cluster address, in the form:
listenaddress1:listenport1,listenaddress2:listenport2;listenaddress3: listenport3
Each listen address:listen port combination in the cluster address corresponds to Managed Server and network channel that received the request.
■
If the request was received on the Managed Servers default channel, the listen address:listen port combinations in the cluster address reflect the
ListenAddress and ListenPort values from the associated ServerMBean and SSLMBean instances. For more information, see The Default Network
Channel in Configuring Server Environments for Oracle WebLogic Server.
■
If the request was received on a custom network channel, the listen address:listen port in the cluster address reflect the ListenAddress and
ListenPort values from NetworkAccessPointMBean that defines the channel. For more information about network channels in a cluster, see Configuring
Network Channels For a Cluster in Configuring Server Environments for Oracle WebLogic Server.
The number of ListenAddress:ListenPort combinations included in the cluster address is governed by the value of the NumberOfServersInClusterAddress
attribute on the ClusterMBean, which is 3 by default.
You can modify the value of NumberOfServersInClusterAddress on the Environments
Clusters ClusterName Configuration General page of the
Administration Console.
■
If there are fewer Managed Servers available in the cluster than the value of NumberOfServersInClusterAddress, the dynamically generated cluster
address contains a ListenAddress:ListenPort combination for each of the running Managed Servers.
■
If there are more Managed Servers available in the cluster than the value of NumberOfServersInClusterAddress, WebLogic Server randomly selects a
subset of the available instances—equal to the value of NumberOfServersInClusterAddress—and uses the
ListenAddress:ListenPort combination for those instances to form the cluster address.
The order in which the ListenAddress:ListenPort combinations appear in the cluster address is random—from request to request, the order will vary.
10.1.5.6.2 Explicitly Defining Cluster Address for Production Environments If you explicitly
define a cluster address for a cluster in a production environment, specify the cluster address as a DNS name that maps to the IP addresses or DNS names of each WebLogic
Server instance in the cluster.
If you define the cluster address as a DNS name, the listen ports for the cluster members are not specified in the cluster address—it is assumed that each Managed
Server in the cluster has the same listen port number. Because each server instance in a cluster must have a unique combination of address and listen port, if a cluster address
is a DNS name, each server instance in the cluster must have:
10-6 Using Clusters for Oracle WebLogic Server
■
a unique address and
■
the same listen port number When clients obtain an initial JNDI context by supplying the cluster DNS name,
weblogic.jndi.WLInitialContextFactory obtains the list of all addresses that are mapped to the DNS name. This list is cached by WebLogic Server instances, and
new initial context requests are fulfilled using addresses in the cached list with a round-robin algorithm. If a server instance in the cached list is unavailable, it is
removed from the list. The address list is refreshed from the DNS service only if the server instance is unable to reach any address in its cache.
Using a cached list of addresses avoids certain problems with relying on DNS round-robin alone. For example, DNS round-robin continues using all addresses that
have been mapped to the domain name, regardless of whether or not the addresses are reachable. By caching the address list, WebLogic Server can remove addresses that are
unreachable, so that connection failures arent repeated with new initial context requests.
10.1.5.6.3 Explicitly Defining Cluster Address for Development and Test Environments If you
explicitly define a cluster address for use in development environments, you can use a cluster DNS name for the cluster address, as described in the previous section.
Alternatively, you can define the cluster address as a list that contains the DNS name or IP address and listen port of each Managed Server in the cluster, as shown in the
examples below:
DNSName1:port1,DNSName1:port2,DNSName1:port3 IPaddress1:port1,IPaddress2:port2;IPaddress3:port3
Note that each cluster member has a unique address and port combination.
10.1.5.6.4 Explicitly Defining Cluster Address for Single, Multihomed Machine If your cluster