Hot start

Pre-provision sandboxes for instant access later on.

Overview

Hot starting is creating a pool of sandbox instances that are instantly available when a learner starts your track. Without Hot Start, sandbox environments start on demand when a learner starts a track. This means learners have to wait for Instruqt to provision the sandbox environment before they can access them.

Manage hot start pools

Create an always hot pool

Take the following steps to create an always hot pool:

  1. Click Settings -> Hot Start to open the Manage hot start page.

  2. Click Create.

  3. Select the tracks or sandbox presets that you want to be preheated.

  4. In the Name field, enter a name for the pool.

  5. In the Number of hot sandboxes per track/sandbox preset field, enter your desired number.

  6. For Hot Start type, select Always hot.

  7. Click Create.

Be cost-effective

Start with a single instance in your hot start pool and increase the number if your learners experience delays. Since the pool refills automatically, you will rarely need more than four or five instances to ensure fast startup times for a steady flow of learners.

Create a scheduled pool

Take the following steps to create a scheduled pool:

  1. Click Settings -> Hot start to open the Manage hot start page.

  2. Select Create.

  3. Select the tracks or sandbox presets that you want to be preheated.

  4. In the Name field, enter a name for the pool.

  5. In the Number of hot sandboxes per track/sandbox preset field, enter your desired number.

  6. For Hot Start type, select Scheduled.

  7. In the Start provisioning on field, select or enter the starting date when the pool should begin provisioning.

  8. Select the Starting time when the pool should begin provisioning.

  9. Select the Time to live.

  10. Click Create.

After the time to live expires for a scheduled hot start, Instruqt closes all unclaimed sandboxes.

Create hot starts from invites

It's possible to create a hot start pool from a track invite. To do so, take the following steps:

  1. Click Share Content to open the Manage track invites page.

  2. Click the ••• of the track invite you want to create a hot start pool for.

  3. Click Create Hot Start pool on the pop-up. ↳ The Create Hot Start page opens, with the settings pre-filled.

  4. Check the settings and click Create to create the pool.

Duplicate hot start pools

Duplicate a hot start pool with the following steps:

  1. Click Settings -> Hot start to open the Hot start page.

  2. Click the ••• of the pool you want to duplicate.

  3. Click Duplicate on the pop-up. ↳ The Create Hot Start page opens, with the settings pre filled.

  4. Check the settings and click Create to create the pool.

Delete hot start pools

Delete a hot start pool with the following steps:

  1. Click Settings -> Hot start to open the Hot start page.

  2. Click the ••• of the pool you want to delete.

  3. Click Delete on the pop-up. ↳ The Delete Hot Start confirmation opens.

  4. Click Confirm.

Best practices

To ensure a smooth and efficient experience with the Hot Start feature, follow these best practices for setup, timing, and cost management.

Use Track-Level Setup Scripts with Health Checks

The Hot Start feature relies on the successful completion of track-level setup scripts to determine if a sandbox environment is ready for a user.

  • Track-level Setup Scripts: Ensure all tracks in your hot start pool use track-level setup scripts for all setup tasks. A successful setup script execution (exiting with a zero exit code) signals that the instance is ready.

  • Challenge-level Setup Scripts: When you need to customize a sandbox environment for a specific user, you can leverage the setup script of the first challenge. This script will have user specific parameters injected as environment values. Keep in mind that this will add extra wait time for users, potentially rendering the Hot Start feature less useful.

  • Implement Health Checks: Add health checks to the end of your setup scripts to verify the environment is fully functional. For example, you can try calling HTTP endpoints or check that all necessary containers are running.

  • Automatic Retries: If a track setup fails (exits with a non-zero exit code), the instance will be terminated automatically, and a new one will be provisioned until the configured limit is reached. This mechanism ensures learners only access instances that provisioned correctly.

Time Your Provisioning Strategically

Properly timing the provisioning of your hot start pool is crucial for having environments ready when your event starts.

  • General Guideline: Start provisioning the hot start pool about 30 minutes before your event begins.

  • Adjust for Scale: You may need to start earlier if:

    • A single instance takes more than a few minutes to provision.

    • You are provisioning a very large pool of instances.

  • Test Your Timing: It's a good practice to test your provisioning time to ensure everything is ready for your actual event.

Terminate the Pool to Save Costs

Avoid unnecessary costs by terminating the hot start pool once most users have started their sessions.

  • When to Terminate: A hot start pool typically doesn't need to run for more than 15 to 30 minutes after the session starts.

  • Claimed vs. Unclaimed Instances: When a pool terminates, hot start instances claimed by users are not affected. Only unclaimed instances will be cleaned up.

FAQ

Why are my tracks taking awhile to load, even with hot start?

When you hot start a track, Instruqt pre-provisions sandboxes and runs all of the corresponding Track setup scripts. The initial challenge's setup script will not run until a user clicks Launch on your track. This means if the challenge setup script takes 3 minutes to complete, users will need to wait 3 minutes! You can mitigate this by placing as much configuration as possible in the initial Track setup script, and keeping the initial challenge setup script as simple as possible. Note: Certain user-related environment variables, such as INSTRUQT_USER_ID, will be empty if they are referenced within track setup scripts and hot started. In this case, you will need to leverage challenge setup scripts if you require those variables.

How far in advance should I create my scheduled hot start pools?

The answer is, of course, it depends! Generally speaking, we recommend scheduling your hot start pools at least an hour ahead of when you'll need them. If you have very complex and long running setup scripts, consider adding more time.

Why is my hot start pool filling so slowly?

Instruqt provisions hot start pools incrementally. At first, only a small batch of sandboxes (~20) are provisioned. If all of the initial sandboxes deploy successfully, the amount of concurrent sandboxes provisioning increases. In the event errors are detected, Instruqt automatically reduces the number of concurrent sandboxes provisioning, preventing large of amounts of failures to occur.

Video tutorial

You can also watch this video tutorial for an explanation of how hot start works:

Last updated

Was this helpful?