Configure active-active and active-failover Temporal clusters

Hi @tihomir ,

We want to deploy two temporal clusters via. docker-compose, each on a different machine. What configuration needs to be done for these two types:

  1. Active-Active
  2. Active-Failover

Thanks.

hi @maxim , @tihomir ,

  1. is it a possible approach to setup multiple (active-active) clusters pointing to same persistence store (in my case we are using MySQL).

  2. From client side (Java SDK) how to connect to both active-active clusters.

for point 2, attaching image for reference:

I don’t understand the problem you are trying to solve. In the majority of cases, a cluster goes down due to persistence having an issue. So attaching two clusters to the same DB will greatly reduce availability.

We can have multiple db, but since we have high db availability, we can point to single db. will it be ok from platform perspective? also awaiting response for point 2, thanks

It cannot be the same logical DB (it should have separate schemas). It obviously can be the same physical DB.

From client side (Java SDK) how to connect to both active-active clusters.

Temporal doesn’t support active-active. A namespace is active in one cluster at a time. We don’t have any direct support for a single client connecting to multiple clusters.

thanks for the response @maxim , considering active-failover, if complete active cluster is down, how it will connect to failover, given client side we give single(active) cluster address only.

Currently, you have to have two sets of workers and clients, one per cluster. This is one of the reasons this feature is still experimental.

If we keep two set of workers each pointing to Active and Failover cluster, and my service (worker) listener is JMS queue based, how can we ensure it will communicate to active cluster only?

You can enable the forwarding of starts and signals between cluster frontends. So you can call start or signal on a passive cluster and it will take care of the forwarding the request to a passive one.

Another option is to disable forwarding and switch between clients when “not active” exception is received.

can you please share a sample snippet for Java SDK/ SDK reference of forwarding, it will help a lot, thanks.

It is a service-side configuration. No changes to the SDKs are needed.