How would you archive A/B deployments?

Hi team,

I was wondering if you have any thoughts on how to archive A/B deployments with Temporal.

Imagine a setup having an application consisting of multiple services (e.g. cart, payment, mailer) installed in two seperate nodes. Both nodes are running version v1 of the application and share and external temporal server.

                    -> Node-A (v1): temporal worker
--> Load Balancer -
                    -> Node-B (v1): temporal worker

Now lets say we’re switching the traffic to “Node-A” in order to update “Node-B” to version v2.

                    -> Node-A (v1): temporal worker
--> Load Balancer -
                       Node-B (v2): temporal worker

The question now is how to handle the workers?
You might not want “Node-B (v2)” to process workflows created by “Node-A (v1)” yet and after switching the traffic to “Node-B (v2)” you don’t want “Node-A (v)” to process any more.

                       Node-A (v1): temporal worker
--> Load Balancer -
                    -> Node-B (v2): temporal worker

Looking forward for some ideas.

Thanks

1 Like

The question now is how to handle the workers?

With workflow versioning you can have any number of versions running from the same worker. It also allows you to update code while workflows are running (for example to fix bugs on already started workflows).

You might not want “Node-B (v2)” to process workflows created by “Node-A (v1)” yet and after switching the traffic to “Node-B (v2)” you don’t want “Node-A (v)” to process any more.

Workflow replay for executions on v2 that get processed by worker that has v1 will fail and cause the workflow task to be retried until it hits the v2 worker again and continue execution. Some transient failures are expected in this situation. This is also the case for rolling deployments with workflow changes.