Enabling workload placement

A multicluster administrator, or a user with the required placement permissions (SMC_PLACEMENTPOLICY_VIEW), can enable workload placement for the IBM® Spectrum Symphony multicluster primary cluster, and query it for a cluster to forward a session's workload. Enable workload placement by specifying the SMC_GLOBAL_PLACEMENT and SMC_MASTER_CLUSTER_URL environment variables within the runtime environment of the client process.

Before you begin

If you intend on using the workload placement feature in multicluster, ensure you have met the following criteria:
  • The multicluster primary cluster and proxy are configured correctly.
  • All lone clusters have been authorized through the multicluster management console.
  • The application for which you expect to redirect workload is deployed to all lone clusters.

Procedure

  1. Set the SMC_GLOBAL_PLACEMENT environment variable to enabled. The client API library will attempt to locate the multicluster primary cluster. The primary cluster sends a list of ranked clusters (that are participating in global workload placement), to the client so that the API library redirects a session’s workload to the highest-ranked cluster. If that cluster cannot fulfill the request, the API library redirects workload to the next ranked cluster, and so on.

    When SMC_GLOBAL_PLACEMENT is set to disabled (or has an empty value, incorrect value, or the variable is unspecified), the client will operate in the default manner and send its workload to its default cluster.

    Note that openSession() is not supported for workload placement:
    • openSession cannot be used to open a session with the session ID returned by the global workload placement feature.
    • openSession only accepts the session ID in its original format using the string of the session ID number, for example, 1, 100, and so on.
    • openSession must be called when the client application is connected with the cluster where the session exists.
  2. Set the SMC_MASTER_CLUSTER_URL environment variable to the cluster URL of multicluster's primary cluster.

    This URL will take the form of a primary list (for example, master_list://hostA.ibm.com:VEMKD_port_number_on_multicluster_primary_cluster hostB.ibm.com:VEMKD_port_number_on_multicluster_primary_cluster).

    The client API library will always attempt to discover the primary cluster's actual URL from a registration in its participating cluster by its proxy. However, if the default cluster or proxy are not available, this variable can be used to discover the primary cluster from another source so that the client can at least be in a position to submit the workload to another cluster that may be available.

  3. Test your configuration by submitting workload for redirection to a lone cluster.
  4. Check the results from the multicluster management console or command line to view the sessionID and verify that the session ID format is actual_sessionID@cluster_name. for example: 143@cluster7.3.2_mc_test).