Skip to content

3060 Worker Queues Process High Activity Triggers

10 Minutes advanced

Ensure timely trigger processing by creating a dynamic pool of workers to handle requests

From this lab, the user will use a cluster of workers to handle a set of WorkOrders in parallel. Business ROI: Dynamic job processing provideds a scalable, general purpose way to automate routine tasks

Prerequisites

Additional Labs:

Concepts

  • trigger
  • contexts
  • clusters

Summary

Create Cluster of workers

  1. From the Clusters view, click Add Set Name to lab3060
    Set `Required Params` `broker/name` to `context-broker`
    
    Click `Save`
    
    1. Wait for cluster to complete building

Put Cluster Machines in WorkOrder mode

  1. Go to the Machines view
  2. Select all machines that start with "lab3060-"
  3. Hover over the Actions dropdown and select Work Order Mode All machines should enter WorkOrder mode and show pending/running Work Orders in the table.

Update lab3010 Trigger

  1. Go to lab3010 editor
  2. Change Filter to cluster/tags:In:lab3060
  3. Set Queue Requests to false
  4. Under Work Order Config, add a parameter, dev/wait-time with a value of 1 Click a white space area to make sure all items are saved

Distribute and Run Work Orders

  1. Go to the Machines view
  2. Click the lab3010 Trigger Button at least 10 times quickly
  3. Notice the lab3060-* machines having pending and running work orders The Work Orders are distributed across the workers in an even fashion and the workers will run the Work Orders taking their next pending Work Order once finished with the current one.

    In the Queue Requests `false` mode for the trigger, the Work Orders are assigned when they are created.
    
  4. Let the Work Orders complete All machines should have '0's showing for pending and running Work Orders.

Convert to Queue Mode for the Trigger.

  1. Go to lab3010 editor
  2. Set Queue Requests to true

Queue Work Orders to the Machines

  1. Go to the Machines view
  2. Click the lab3010 Trigger Button at least 10 times quickly
  3. Noitce the lab3060-* machines having pending and running work orders The Work Orders are distributed to all machines and each machine will run a Work Order order from the queue when it can. This cause lets the work distribute to the machines based upon their availablity.

  4. Let the Work Orders complete All machines should have '0's showing for pending and running Work Orders.