Scheduling Deployments

Problem Statement

Schedule resource-heavy deployments on customer-facing hardware at low-traffic times so that customers are least likely to be impacted.

Full example scenario

As a DevOps engineer, you are responsible for scheduling deployments throughout the day while minimizing the maximum load on the servers at any given time. You have data on the expected load during the day from regular customer usage, which consumes part of the available load on the servers. Additionally, you have several deployments planned, each with its own load requirements and duration. The challenge is to schedule these deployments such that the load deviation on the servers is minimized, while ensuring the load never surpasses 100%.

  • All deployments have to be executed, and each deployment’s start time must fall within its own start window.

  • The total load at any given time (customer load plus deployment load) must never exceed server capacity.

  • Deployments are non-preemptive: once started, a deployment runs to completion without pausing.

  • The customer load can be found in scheduling_deployments_base_load.csv, with the columns Time,Customer Load.

  • The deployments can be found in scheduling_deployments_deployments.csv, with the columns Deployment ID,Deployment Load,Deployment Duration,Deployment Start Window Start,Deployment Start Window End.

What an optimal solution looks like

Customer load (grey) plus every deployment's contribution, hour by hour.

The four hours marked in red — 6, 8, 17 and 21 — all land on the peak of 65%. Hover or focus a bar for its exact customer/deployment split.

0 20 40 60 80 100 Hour of day Load (%) 0 Hour 0 customer 20% + deploy 40% = 60% 1 Hour 1 customer 25% + deploy 0% = 25% 2 Hour 2 customer 30% + deploy 0% = 30% 3 Hour 3 customer 22% + deploy 0% = 22% 4 Hour 4 customer 18% + deploy 10% = 28% 5 Hour 5 customer 15% + deploy 30% = 45% 6 Hour 6 customer 20% + deploy 45% = 65% 7 Hour 7 customer 35% + deploy 25% = 60% 8 Hour 8 customer 50% + deploy 15% = 65% 9 Hour 9 customer 60% + deploy 0% = 60% 10 Hour 10 customer 55% + deploy 0% = 55% 11 Hour 11 customer 45% + deploy 15% = 60% 12 Hour 12 customer 40% + deploy 15% = 55% 13 Hour 13 customer 38% + deploy 15% = 53% 14 Hour 14 customer 35% + deploy 0% = 35% 15 Hour 15 customer 33% + deploy 30% = 63% 16 Hour 16 customer 30% + deploy 25% = 55% 17 Hour 17 customer 40% + deploy 25% = 65% 18 Hour 18 customer 50% + deploy 0% = 50% 19 Hour 19 customer 55% + deploy 0% = 55% 20 Hour 20 customer 60% + deploy 0% = 60% 21 Hour 21 customer 45% + deploy 20% = 65% 22 Hour 22 customer 35% + deploy 20% = 55% 23 Hour 23 customer 25% + deploy 20% = 45%
Customer load Deployment load Peak load (65%) Server capacity (100%)

This is the baseline plan, before the D8 → D2 precedence requirement introduced in the Changing the model tab. Under that requirement D2 moves to hour 16, but the peak stays at 65%.

When each deployment runs

Same hour axis as above, one bar per deployment's active window. The row a bar sits in carries no meaning of its own — it only keeps overlapping deployments apart. A deployment is placed in the lowest row that's already free by its start hour, so unrelated deployments don't each get a permanent row.

D6 · hour 0 · 10% load D6 D10 · hour 0 · 30% load D10 D1 · hours 4-5 · 10% load D1 D7 · hours 5-6 · 20% load D7 D4 · hours 6-7 · 25% load D4 D2 · hour 8 · 15% load D2 D8 · hours 11-13 · 15% load D8 D5 · hour 15 · 30% load D5 D9 · hours 16-17 · 25% load D9 D3 · hours 21-23 · 20% load D3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Hour of day

D1: Deployment #1 · D2: Deployment #2 · … · D10: Deployment #10

Built with Modeler

The problem above is stated as a single shot: you hand over the whole problem and get a model back. Modeler takes the other route — you start with the business question you actually have, and it works with you until the problem is pinned down, the data is in, the code runs, and the answer holds up when the problem changes.

The tabs below walk the same deployment scheduling problem through that route, one Modeler capability at a time.

Instead of writing the whole prompt up front, you start with the business question you actually have. Modeler searches the knowledge base, asks one clarifying question at a time — always the most important one first — and tells you which parts of the model are still missing. The options it offers come from examples in the knowledge base and from how similar problems are usually modeled in your industry, so you can answer with a number instead of prose.

As a DevOps engineer, I need to schedule a batch of deployments across the day on our servers, and I want to keep the load on the servers as even as possible throughout the day — not spike anywhere. We already have regular customer traffic taking up part of server capacity throughout the day, and each deployment adds its own load for a while once it starts.

This is a scheduling problem with a load-leveling objective — deployments are jobs with a start-time decision, customer traffic is a fixed background load, and the goal is some notion of “as even as possible.” Let me search the knowledge base for how similar load-balancing schedules are usually modeled before asking anything.

Good, scheduling problems in the knowledge base confirm this is a start-time assignment problem. Before I can even talk about the objective, I need to know how the day is discretized — that determines the whole variable structure, so it has to be the first question.

Good context from the knowledge base. Let me start building the specification with you. I’ll ask questions one at a time to make sure I capture everything correctly.

Question 1 of ~8: How is the day divided for scheduling purposes? For example:

  1. Fixed time slots of equal length (e.g., 1-hour slots, 30-minute slots, 15-minute slots)

  2. Continuous time with any start time possible

  3. Predefined windows (e.g., morning, afternoon, evening)

Which best describes your setup, and how long is the scheduling horizon (e.g., a single 24-hour day, a business-hours window like 08:00–20:00)?

Learn More:
• Scheduling | Gurobi ★★☆

It’s a single 24-hour day, divided into 24 one-hour slots (hour 0 through hour 23). Each deployment has its own load requirement, a duration in hours, and a window of hours during which it’s allowed to start — once started it has to run to completion without pausing (non-preemptive). Also, one hard requirement: the total load on the server (customer load plus any deployments running) must never exceed 100% capacity at any hour.

That answers the discretization question and volunteers three more pieces on top of it: the per-deployment fields (load, duration, window), the non-preemptive rule, and a hard capacity cap. All four go straight into the specification. What’s still missing is the objective itself — “as even as possible” is directional, not a formula, so that has to be the next question, and it changes which auxiliary variable the model needs.

Got it. Here is what I have captured so far:

• 24 one-hour slots (hour 0–23)
• Each deployment has: load, duration, and an earliest/latest start window
• Non-preemptive execution
• Hard capacity cap of 100% at every hour

Question 2 of ~7: Regarding the objective — “keeping the load as even as possible” — which approach best matches your goal?

  1. Minimize the peak load across all hours (i.e., minimize the single worst hour — a min-max approach)

  2. Minimize the total load variance across hours (minimize how much each hour deviates from the average)

  3. Minimize the sum of excess load above a target threshold (e.g., penalize every hour that goes above 70% capacity)

  4. A combination of the above

Option 1 is the most common and computationally efficient for this type of problem. Which fits your needs best?

Modeler updates the specification after every answer, even while it is still incomplete — so you can always see what it has understood and what it is still waiting on.