Best practice to build & deploy Temporal workflows

888 Views Asked by At

I am using the GO SDK from Temporal, and I was wondering what is the best practice way to package and deploy Workflows.

Can I bundle all my workflows and activities into one Worker service? Is there any limitation by doing this, or is it recommended to deploy/build each workflow separately?

Also I would like to expose http endpoints to trigger the workflows. What is the best practice to do this if I deploy Temporal on Kubernetes (GKE), expose an ingress/service resource?

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

From the technical point of view, the Temporal doesn't impose any specific requirement on the packaging. It supports a single bundle that contains any number of workflows and activities and it supports deployment of a single activity or workflow type independently.

Treat workflows and activities as long-running operations. Then treat the unit of deployment as a microservice. Then the same logic that applies to microservices applies here. So if collocating workflows and activities together makes sense from the code and operational point of view do it.