18 Using Service Migration in an Enterprise Deployment
The Oracle WebLogic Server migration framework supports Whole Server Migration and Service Migration. Whole Server Migration requires more resources and a full start of a managed server, so it involves a higher failover latency than Service Migration. The products included in this EDG support Service Migration. Hence, Service Migration is recommended and this guide explains how to use Service Migration in an Oracle Fusion Middleware enterprise topology. Whole Server migration is out of the scope of this guide.
About Automatic Service Migration in an Enterprise Deployment
Oracle WebLogic Server provides a migration framework that is an integral part of any highly available environment. The following sections provide more information about how this framework can be used effectively in an enterprise deployment.
Understanding the Difference between Whole Server and Service Migration
The Oracle WebLogic Server migration framework supports two distinct types of automatic migration:
-
Whole Server Migration, where the Managed Server instance is migrated to a different physical system upon failure.
Whole server migration provides for the automatic restart of a server instance, with all its services, on a different physical machine. When a failure occurs in a server that is part of a cluster which is configured with server migration, the server is restarted on any of the other machines that host members of the cluster.
For this to happen, the servers must use a floating IP as listen address and the required resources (transactions logs and JMS persistent stores) must be available on the candidate machines.
See Whole Server Migration in Administering Clusters for Oracle WebLogic Server.
-
Service Migration, where specific services are moved to a different Managed Server within the cluster.
To understand service migration, it's important to understand pinned services.
In a WebLogic Server cluster, most subsystem services are hosted homogeneously on all server instances in the cluster, enabling transparent failover from one server to another. In contrast, pinned services, such as JMS-related services, the JTA Transaction Recovery Service, and user-defined singleton services, are hosted on individual server instances within a cluster—for these services, the WebLogic Server migration framework supports failure recovery with service migration, as opposed to failover.
See Understanding the Service Migration Framework in Administering Clusters for Oracle WebLogic Server.
Implications of Service Migration in an Enterprise Deployment
Using Automatic Service Migration (ASM) in an Enterprise Deployment has implications in the infrastructure and configuration requirements.
The implications are:
-
The resources used by servers must be accessible to both the original and failover system
In its initial status, resources are accessed by the original server or service. When a server or service is failed over/restarted in another system, the same resources (such as external resources, databases, and stores) must be available in the failover system. Otherwise, the service cannot resume the same operations. It is for this reason, that both whole server and service migration require that all members of a WebLogic cluster have access to the same transaction and JMS persistent stores.
Oracle allows you to use JDBC stores, which leverage the consistency, data protection, and high availability features of an oracle database and makes resources available for all the servers in the cluster. Alternatively, you can use shared storage. When you configure persistent stores properly in the database or in shared storage, you must ensure that if a failover occurs (whole server migration or service migration), the failover system is able to access the same stores without any manual intervention.
-
Leasing Datasource
Service migration requires the configuration of a leasing datasource that is used by servers to store alive timestamps. These timestamps are used to determine the health of a server or service, and are key to the correct behavior of server and service migration (they are used to marks servers or services as failed and trigger failover).Note:
Oracle does not recommend that you use consensus leasing for HA purposes.
Understanding Which Products and Components Require Whole Server Migration and Service Migration
The following table summarizes the list of FMW products and components that benefit from use of a migration capability and indicates the best-practice recommendation for this release. Components listed as migratable can use either Whole Server or Automatic Service Migration.
Note that the table lists the recommended best practice. It does not preclude you from using Whole Server or Automatic Server Migration for those components that support it.
| Component | Whole Server Migration (WSM) | Automatic Service Migration (ASM) |
|---|---|---|
|
Oracle Web Services Manager (OWSM) |
NO |
NO |
|
Oracle WebCenter Portal |
NO |
NO |
|
Oracle WebCenter Portal Portlets and Pagelet Producers |
NO |
NO |
|
Oracle WebCenter Content |
YES |
YES (Recommended) |
|
Oracle WebCenter Inbound Refinery |
NO |
NO |
|
Oracle SOA Suite |
YES |
YES (Recommended) |
|
Oracle Enterprise Scheduler |
NO |
NO |
Creating a GridLink Data Source for Leasing
Automatic Service Migration requires a data source for the leasing table, which is a table that resides in a tablespace, and schema created automatically, as part of the Oracle WebLogic Server schemas by the Repository Creation Utility (RCU).
Note:
To accomplish data source consolidation and connection usage reduction, you can
reuse the WLSSchemaDatasource as is for database leasing. This
data source is already configured with the FMW1412_WLS_RUNTIME
schema, where the leasing table is stored.
For an enterprise deployment, you should create a GridLink data source:
Configuring Automatic Service Migration in an Enterprise Deployment
You may need to configure automatic service migration for specific services in an enterprise deployment.
Note:
The Automatic Service Migration feature is part of Oracle Integration Continuous Availability. For more details on Oracle SOA Suite for Middleware Options, see Oracle Fusion Middleware Licensing Information.Setting the Leasing Mechanism and Data Source for an Enterprise Deployment Cluster
Note:
To accomplish data source consolidation and connection usage reduction, you can
reuse the WLSSchemaDatasource datasource as is for database
leasing. This datasource is already configured with the
FMW1412_WLS_RUNTIME schema, where the leasing table is
stored.
The following procedure assumes that you have configured the Leasing data source either by reusing the WLSSChemaDatasource or a custom datasource that you created as described in Creating a GridLink Data Source for Leasing.
After you complete the database leasing configuration, continue with the configuration of the service migration:
Configuring Automatic Service Migration
After you have configured the leasing for the cluster as described in Setting the Leasing Mechanism and Data Source for an Enterprise Deployment Cluster, you can configure automatic service migration for specific services in an enterprise deployment. The following sections explain how to configure and validate Automatic Service Migration for static clusters.
Changing the Migration Settings for the Managed Servers in the Cluster
After you set the leasing mechanism and data source for the cluster, you can then enable automatic JTA migration for the Managed Servers that you want to configure for service migration. Note that this topic applies only if you are deploying JTA services as part of your enterprise deployment.
About Selecting a Service Migration Policy
When you configure Automatic Service Migration, you select a Service Migration Policy for each cluster. This topic provides guidelines and considerations when selecting the Service Migration Policy.
For example, products or components running singletons or using Path services can benefit from the exactly-once policy. With this policy, if at least one Managed Server in the candidate server list is running, the services hosted by this migratable target are active somewhere in the cluster if servers fail or are administratively shut down (either gracefully or forcibly). This can cause multiple homogenous services to end up in one server on startup.
When you use this policy, you should monitor the cluster startup to identify what servers are running on each server. You can then perform a manual failback, if necessary, to place the system in a balanced configuration.
Other Fusion Middleware components are better suited for the failure-recovery policy.
Based on these guidelines, the following policies are recommended for an Oracle WebCenter enterprise topology:
-
SOA_Cluster: failure-recovery
-
WCC_Cluster: failure-recovery
See Policies for Manual and Automatic Service Migration in Administering Clusters for Oracle WebLogic Server.
Setting the Service Migration Policy for Each Managed Server in the Cluster
After you modify the JTA migration settings for each server in the cluster, you can then identify the services and set the migration policy for each Managed Server in the cluster, using the WebLogic Remote Console:
Validating Automatic Service Migration
Failing Back Services After Automatic Service Migration
When Automatic Service Migration occurs, Oracle WebLogic Server does not support failing back services to their original server when a server is back online and rejoins the cluster.
As a result, after the Automatic Service Migration migrates specific JMS services to a backup server during a fail-over, it does not migrate the services back to the original server after the original server is back online. Instead, you must migrate the services back to the original server manually.
To fail back a service to its original server, use WLST migrate command. For more information, see WLST Command Reference for Oracle WebLogic Server.