Enabling watsonx Assistant to process API requests on multiple clusters

You can configure IBM watsonx Assistant for an active-active multi-cluster deployment, enabling API requests to be processed across multiple clusters. When you enable this feature, watsonx Assistant service instances have deterministic URLs. The term active-active refers to distributing workloads across multiple clusters to enhance availability and fault tolerance. However, unlike a traditional active-active architecture, this deployment does not ensure session continuity across clusters and does not involve data replication. Each cluster operates independently in terms of session handling and data storage.

To use this configuration completely, keep watsonx Assistant instance names and watsonx Assistant names identical across the clusters. watsonx Assistant name refers to the name assigned while creating a watsonx Assistant within an instance. 
Using the same instance name for your watsonx Assistant ensures deterministic URL resolution, leading to identical assistant and environment IDs across different clusters. This consistency eliminates the need to specify the watsonx Assistant's name in API calls, as the IDs remain constant across the clusters.

Who needs to complete this task?

Instance administrator An instance administrator can complete this task.

When do you need to complete this task?

Complete this task if you think you might want this instance of watsonx Assistant to be part of an active-active multi-cluster deployment.

You must complete this task before you provision watsonx Assistant service instances.

You cannot apply this configuration after you create the service instances.

Important: Complete this task on all clusters that you want to include in the active-active multi-cluster deployment.

Before you begin

Generate a version 4 universally unique identifier (UUID) and set the ACTIVE_ACTIVE_SEED environment variable to the UUID:

Linux®
export ACTIVE_ACTIVE_SEED=$(uuidgen -r)
Mac OS
export ACTIVE_ACTIVE_SEED=$(uuidgen)
Windows Subsystem for Linux
export ACTIVE_ACTIVE_SEED=$(uuidgen -r)
Important: You must use the same UUID for all clusters participating in the active-active deployment topology.

About this task

To enable an active-active multi-cluster deployment topology, you must edit the watsonx Assistant custom resource to:
  • Enable active-active mode
  • Specify the Version 4 universally unique identifier (UUID) that you want to use

Procedure

Complete the following steps on both clusters where you want to enable active-active mode for watsonx Assistant:

  1. Log in to Red Hat® OpenShift® Container Platform as a user with sufficient permissions to complete the task.
    ${OC_LOGIN}
    Remember: OC_LOGIN is an alias for the oc login command.
  2. Set the ASSISTANT_CR to the name of the watsonx Assistant custom resource:
    export ASSISTANT_CR=$(oc get wa -n=${PROJECT_CPD_INST_OPERANDS} | grep -v NAME | awk '{print $1}')
  3. Patch the custom resource to enable active-active mode and specify the UUID:
    oc patch wa ${ASSISTANT_CR} \ --namespace=${PROJECT_CPD_INST_OPERANDS} \ --type=merge \ --patch="{ \ \"configOverrides\":{ \ \"store\":{ \ \"extra_vars\":{ \ \"store\":{ \ \"ACTIVE_ACTIVE_ENABLED\":\"true\", \ \"ACTIVE_ACTIVE_SEED\":\"${ACTIVE_ACTIVE_SEED}\"}}}}}

    When you run this command, the ${ASSISTANT_CR}-store pods are automatically restarted.

  4. Wait for the custom resource to be ready and stable before you create any service instances.
    To check the status of the custom resource, run the following command:
    oc get wa --namespace=${PROJECT_CPD_INST_OPERANDS}
    The response has the following format:
    NAME  VERSION   READY   READYREASON   UPDATING   UPDATINGREASON   DEPLOYED   VERIFIED   QUIESCE        AGE
    wa    5.1.0     True    Stable        False      Stable           19/19      19/19      NOT_QUIESCED   25h

    Ensure that READY is True and that READYREASON and UPDATINGREASON are Stable.