1.Creating clusters and understanding its concept GETTING STARTED
Cluster Cluster is used for the load balancing and failover feature. Let us take a scenario of load balancing: - There is an application deployed on a cluster with 2 member managed servers, there are 10 requests coming in for the application. The cluster takes care of the fact that there is a proper load balancing happening, 5 requests will go to managed server 1 and 5 to the second managed server. For failover: - If managed server 1 is serving the request and suddenly the server goes down, the cluster’s job is to store the session information in the memory and when the server goes down, the session information is passed on to the second managed server so that the user is not redirected to the login page again.
To create a cluster, expand Environment, click on Clusters. Click on lock and edit, then new. The next screen asks you to give the details of the cluster. Give the cluster name. Multicast address of the cluster will be 184.108.40.206 by default. Give the multicast port.
A multicast address is an IP address in the range from 220.127.116.11 to 18.104.22.168. The default multicast value used by WebLogic Server is 22.214.171.124. You should not use any multicast address within the range x.0.0.1. Cluster Address: This is where you give the list of managed servers by specifying comma separated addresses of the servers. Number Of Servers In Cluster Address: Number of servers to be listed from this cluster when generating a cluster address automatically. Now click on the cluster from the console, you will see the properties of the cluster in the configurations-> general tab.
Default Load Algorithm: By default the cluster uses round robin, which means one request per server and the cycle continues. - Weight based: The managed servers can be configured to take certain amount of load of request (Example: 30% : 70%) - Random: For the incoming requests, any server will be randomly selected by the cluster. - Round-Robin-Affinity: When there is more affinity (preference) given to one managed server to handle the requests - Weight-Based-Affinity: Having a preference for some server even after defining percentage of weight of load to be handled. - Random-Affinity: Can specify more than one preferred server.
Cluster Address: This is where you give the list of managed servers by specifying comma separated addresses of the servers. Number Of Servers In Cluster Address: Number of servers to be listed from this cluster when generating a cluster address automatically. Advanced options for the cluster: - WebLogic Plug-In Enabled: This should be checked if a proxy server of HttpClusterServlet is used in the architecture to send the request to the cluster. - Service Age Threshold: The number of seconds by which the age of two conflicting services must differ before one is considered older than the other. - Member Warmup Timeout: Maximum number of seconds that a cluster member will wait to discover and synchronize with other servers in the cluster.
Tab Configuration -> Replication: - Cross-cluster Replication Type: Defines a cross clustering mode between member servers of 2 clusters. - Remote Cluster Address: This will be the address of another cluster for the cross cluster replication - Replication Channel: The channel name to be used for replication traffic which is used to send updates of sessions - Data Source For Session Persistence: To store HTTP session information, datasources need to be used - Persist Sessions On Shutdown: Defines that even when the servers are shutdown, the session information on them will not be lost - Secure Replication Enabled: Security is added for transferring the session information. session data for in-memory replication will be sent over SSL.
Other important cluster tabs: - Monitoring: When an application is deployed on the cluster and requests are being served by the member servers, details of the servers are shown in the tabs. You can customize the table to get more information. - Deployments: Applications targeted on the cluster To add servers to the cluster, click on the cluster created, go to Configurations -> Servers tab and add the servers. It is not recommended to add admin server to the cluster. Though it will participate in the load balancing and failover features, the admin server is preferably kept for administration purposes.