Amlan
Amlan

Reputation: 253

Uber Cadence production setup

I was looking for a microservice orchestrator and came across Uber Cadence. I have gone through the documentation and also used it in the development setup.

I had a few questions for production scenarios:

  1. Is it recommended to have a dedicated tasklist for the workflow and the different activities used by it? Or, should we use a single tasklist for all? Does this decision impact the scalability or performance?

  2. When we add a new worker machine, is it a common practice to run all the workers for different activities/workflows in the same machine? Example:

    Worker.Factory factory = new Worker.Factory("samples-domain");
    
    Worker helloWorkflowWorker = factory.newWorker("HelloWorkflowTaskList");
    helloWorkflowWorker.registerWorkflowImplementationTypes(HelloWorkflowImpl.class);
    
    Worker helloActivityWorker = factory.newWorker("HelloActivityTaskList");
    helloActivityWorker.registerActivitiesImplementations(new HelloActivityImpl());
    
    Worker upperCaseActivityWorker = factory.newWorker("UpperCaseActivityTaskList");
    upperCaseActivityWorker.registerActivitiesImplementations(new UpperCaseActivityImpl());
    
    factory.start();
    

    Or should we run each activity/workflow worker in a dedicated machine?

  3. In a single worker machine, how many workers can we create for a given activity? For example, if we have activity HelloActivityImpl, should we create multiple workers for it in the same worker machine?

  4. I have not found any documentation for production set up. For example, how to install and configure the Cadence Service in production? It will be great if someone can direct me to the right material for this.

  5. In some of the video tutorials, it was mentioned that, for High Availability, we can setup Cadence Service across multiple data centers. How do I configure Cadence service for that?

Upvotes: 0

Views: 1426

Answers (2)

Long Quanzheng
Long Quanzheng

Reputation: 2391

You can also use Cadence helmchart https://hub.helm.sh/charts/banzaicloud-stable/cadence

I am actively working with Cadence team to have operation documentation for the community. It will be useful for those don't want to run on K8s, like myself. I will come back later as we make progress.

Current draft version: https://docs.google.com/document/d/1tQyLv2gEMDOjzFibKeuVYAA4fucjUFlxpojkOMAIwnA

will be published to cadence-docs soon.

Upvotes: 1

Maxim Fateev
Maxim Fateev

Reputation: 6870

  1. Unless you need to have separate flow control and rate limiting for a set of activities there is no reason to use more than one task queue per worker process.

  2. As I mentioned in 1 I would rewrite your code as:

     Worker.Factory factory = new Worker.Factory("samples-domain");
     Worker worker = factory.newWorker("HelloWorkflow");
     worker.registerWorkflowImplementationTypes(HelloWorkflowImpl.class);
     worker.registerActivitiesImplementations(new HelloActivityImpl(), new UpperCaseActivityImpl());
     factory.start();
    
  3. There is no reason to create more than one worker for the same activity.

  4. Not sure about Cadence. Here is the Temporal documentation that shows how to deploy to Kubernetes.

  5. This documentation is not yet available. We at Temporal are working on it.

Upvotes: 2

Related Questions