Snaplex-based Scheduler for Scheduled Tasks

Overview

The Snaplex-based Scheduler is a platform feature that improves the timeliness and reliability of Scheduled Tasks. The Snaplex-based Scheduler relies on operations in the Snaplex to activate the Task and trigger the underlying Pipeline. Previously, the scheduler in the SnapLogic Control Plane handled all Scheduled Task executions. Now, the scheduling duties are shared between the Snaplex and the Control Plane scheduler, making Scheduled Task executions timelier and more reliable. 

The feature is currently activated by enabling a feature flag, allowing you to run the Snaplex-based Scheduler on your development Orgs and monitor the results. During the 4.26 release (August 2021), the Snaplex-based Scheduler will be enabled by default in all SnapLogic Orgs on the auto-upgrade date of September 18. Hence, you do not have to update your Snaplex instances to enable the new scheduler.

Snaplex-based Scheduler Implementation Rollout

Rollout PhaseSnaplex-based Scheduler ImplementationMilestoneDate
Phase 1Available as an opt-in feature by request.4.23November 9, 2020
Phase 2

Available for all Scheduled Tasks on all Orgs with Snaplex instances by enabling a feature flag.

4.24 GAFebruary 13, 2021
Phase 3

Recommended for Development Orgs through enabling the feature flag.

Post-4.24 Automatic UpgradeMarch 20, 2021
Phase 4

Enabled as default for all Orgs.

4.26 (Automatic Upgrade)September 18, 2021

Enabling the Snaplex-based Scheduler for your Orgs

Do not delete existing feature flags

The following procedure describes how to enable the Snaplex-based Scheduler feature flag on an Org, and thus requires that you have Org admin access to perform the steps. Since some Orgs may already have existing feature flags, you must also include those feature flags in addition to the Snaplex-based Scheduler feature flag when you run the request.

You can enable the feature flag using cURL, Postman, Powershell, as well as any REST client or terminal of your preference, but some of the syntax or details may differ.


  1. Obtain your Org ID by navigating to Manager > Settings. You can find your Org ID below Organization Id at the top of the Settings page. Alternatively, you can run the following API call: 
    https://elastic.snaplogic.com/api/1/rest/asset/<Org_name>
    The API call requires authentication. In the returned response, the Org Id is the value to the org_snode_id key.

  2. Check to see if you have any feature flags already set for your Org.

    Important

    If you have other existing feature flags set for your Org, then they must be appended to the request in Step 3. Contact SnapLogic Support for questions about current feature flags.


    1. Make the following request from a browser:

      https://elastic.snaplogic.com/api/1/rest/admin/snappack/org-dist/<Org_snode_id>
      Sample Response
      {
          "response_map": {
            "overrides": {},
            "_id": "52e99318640a9a03d8681d0d",
            "flag_overrides": {
                <Existing_feature_flag>
                                 },
            "dist_id": "latest"
                              },
          "http_status_code": 200
      }

      Where <Existing_feature_flags> are the feature flags that are already enabled in the Org.

    2. Make note of any existing feature flags for Step 3.

  3. Apply the following feature flag to a specific Org, appending any existing feature flags from Step 2.

    "com.snaplogic.cc.service.SchedulerService.PLEX_SCHEDULER_EXECS": "true"
    Example CURL Command for Enabling Snaplex-based Scheduler

    curl -u <org_admin_username> -H 'Content-Type: application/json' --data-binary '{"flag_overrides": {"com.snaplogic.cc.service.SchedulerService.PLEX_SCHEDULER_EXECS": "true", ...<Existing_feature_flag>}}' https://elastic.snaplogic.com/api/1/rest/admin/snappack/org-dist/<org_snode_id>


    Where:

    • The org_admin_username is the username of the Org admin.

    • The org_snode_id is the Org identifier (for example: 52e44318640a9a03d8681d0d).

    • <Existing_feature_flag> indicates any existing feature flags from Step 2a.


  4. To verify that the Snaplex-based Scheduler feature is enabled for a specific Org, make the following request in a browser:

    Request
    https://elastic.snaplogic.com/api/1/rest/admin/snappack/org-dist/<Org_snode_id> 

    The highlighted text in the response is the Snaplex-based Scheduler feature flag.

  5. Monitor your Scheduled Tasks for each schedule type (minute, day, week, month, year, and cron) on the SnapLogic Dashboard to verify timelier Task executions.


Disable Option

During the rollout, we recommend that you keep the Snaplex-based Scheduler enabled and encourage you to contact SnapLogic Support for help with the implementation. If reverting to the Control Plane scheduler is necessary, you can run the following command to disable the Snaplex-based Scheduler:

curl -u <Org_admin_user_name> -H 'Content-Type: application/json' --data-binary '{"flag_overrides": "com.snaplogic.cc.service.SchedulerService.PLEX_SCHEDULER_EXECS": "false",  ...<Existing_Feature_Flags> }}'https://elastic.snaplogic.com/api/1/rest/admin/snappack/org-dist/<org_snode_id>

However, if you set the Snaplex-based Scheduler feature flag to false, then you will have to switch it to true in order for the Snaplex-base Scheduler to be enabled for your Org.


FAQ

Is the execution of Scheduled Tasks still dependent on the Control Plane?

Yes, the Snaplex-based Scheduler still requires a periodic connection to the Control Plane. The Snaplex-based scheduler can operate through network disruptions, but is not guaranteed to continue running with Control Plane outages.

If the connection to the Control Plane is disrupted, does the scheduling continue to work as long as the nodes are running?

Yes. However, some Pipeline executions may require connectivity to the Control Plane to retrieve accounts, files, and libraries. Retrieving these assets from the Control Plane during a disruption may cause Pipelines to fail.

What happens during rolling restart?

The scheduling process is performed by the Snaplex node. During the cooldown state, the node heartbeat checks which node is the scheduler, and then the elected node synchronizes its Tasks with the Control Plane, changes the scheduler from standby to started, and begins running Scheduled Tasks.

If the scheduling node fails, are the Scheduled Tasks missed or queued?

Similar to the rolling restart, when a node fails, another node takes over in the Snaplex and executes the Scheduled Tasks. The Snaplex-based Scheduler uses the same 15-minute timeout for failed scheduled triggers. As long as the scheduling node is back online before the 15 minutes has passed, then the Tasks should not be missed, though they may be delayed.

Are cron jobs still supported?

Yes, the Snaplex-based Scheduler supports cron jobs in the 4.24 Release (February 2021).

What information should I use to troubleshoot?

You can look at the Task history in the Task Details page to find the node on which the Task was scheduled. With this information, you can view the logs on the scheduler node to determine what happened

Does encryption work the same with the Snaplex-based Scheduler?

Yes, there is no change to the encryption of accounts.

If the Snaplex-based Scheduler feature flag is set to false for my Org, do I have to reset the flag to true to enable it at 4.26 GA?

Yes, you must enable the feature flag to turn on the Snaplex-based Scheduler. Feature flag settings at the Org level take precedence over the global setting in the 4.26 GA release.