23.1.17. 3060 Worker Queues Process High Activity Triggers

23.1.17.1. Overview

  • Id: 3060

  • Time: 10 Minutes

  • Enabled: Yes

  • Difficulty: advanced

  • Tags: core

  • Concepts: trigger, contexts, clusters

23.1.17.2. Objective

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

23.1.17.3. Prerequisites

Required Labs:

  • 1010

  • 3010

23.1.17.3.1. Summary

23.1.17.3.1.1. 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

  2. Wait for cluster to complete building

23.1.17.3.1.2. 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.

23.1.17.3.1.3. 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

23.1.17.3.1.4. 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.

23.1.17.3.1.5. Convert to Queue Mode for the Trigger.

  1. Go to lab3010 editor

  2. Set Queue Requests to true

23.1.17.3.1.6. 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.