Workload
A workload is any program, or group of programs, that infrastructure runs as one unit. A web service that stays up for months and a script that exits after a second are both workloads, so the term is deliberately loose. What makes a group of programs one workload is that infrastructure starts and stops them together. A web application and its database could be one workload or two, depending on how their operator wants to manage them.
Infrastructure treats workloads as interchangeable units that it can place on any machine with room, without knowing what each one does. What it needs to know instead is how each one uses resources. The contract between the two is narrow: the workload sees a machine, and the infrastructure sees a pattern of resource use. That narrow contract lets infrastructure move a workload or restart it elsewhere without changing its code.
A workload consumes compute and memory while it runs, and its owner pays for what it holds. Describing work as workloads lets one fleet of machines serve many owners and many kinds of program at once. Holding and using are not the same, since a workload often reserves more than it touches at any moment. The gap between the two is where providers find room to pack more workloads onto each machine.
Workload traits
Workload traits are the ways workloads differ in how they use resources, and they matter more than what a workload does. They decide where a workload can run and what it needs from the machine. Two programs that do very different jobs, such as video encoding and scientific simulation, can look alike to a scheduler. Two programs that do the same job can look different, if one keeps its data in memory and the other reads it from disk.
Two traits matter most for placement. The bottleneck of a workload decides which resource limits its speed, and its duration decides whether it holds a machine for minutes or for months. Bottleneck sets the shape of the machine a workload needs, such as one with many cores or one with a large amount of memory. Duration sets how often the infrastructure gets a chance to rearrange things, since a long-running service keeps its resources until it is moved.
The other traits decide how a workload is served and what may share a machine with it. A request sensitive to latency must answer quickly, and untrusted code needs more distance from its neighbors. A latency-sensitive service often gets reserved processor time, so a busy batch job next to it cannot slow its answers. Some operators keep untrusted workloads on hosts of their own, so a flaw in the isolation cannot reach a sensitive neighbor.
| Trait | Description |
|---|---|
| Duration | Long-running services stay up indefinitely, while batch jobs and short tasks exit when their work is done. |
| Bottleneck | A workload is limited by processor time, by the size or speed of memory, or by disks and the network. |
| State | A stateless workload can restart anywhere, while a stateful one depends on data it has written and must keep. |
| Latency sensitivity | An interactive request has to answer in milliseconds, while a nightly report can wait. |
| Trust | Code written by the operator can share more with its neighbors than untrusted code can. |
Workload placement
Workload placement is the choice of which machine runs each workload. A scheduler reads declared requests for processors and memory, then picks a server with room for them. Requests are declared up front because the scheduler cannot see how much a workload will use before it runs. A request set too low gets the workload slowed or stopped, and one set too high leaves room idle that nobody else can use.
Mixing workloads with different bottlenecks on one machine uses it more fully. A CPU-bound job and a memory-bound one can share a host that neither would fill alone. Placing workloads with the same bottleneck together does the opposite, since they compete for one resource while the rest of the machine sits idle. Mixing only works if the scheduler knows each bottleneck, which declared requests do not always reveal.
Trust changes the problem. Workloads from one owner can run side by side as processes or containers, while code nobody has reviewed needs a stronger isolation boundary, such as a separate virtual machine. Processes and containers share one kernel, so a flaw in that kernel exposes every workload on the host. A virtual machine adds its own kernel behind a hypervisor, at some cost in memory and start time.
Short-lived workloads
Short-lived workloads are small, brief units of work, such as a CI step or a piece of code generated by an agent. Many newer workloads take this form. They do one thing and exit, and they often arrive in bursts rather than at a steady rate. Serverless functions follow the same pattern.
For these workloads, the time and cost of creating an environment can exceed the time spent running the work itself. Start time and density then matter as much as raw speed. Small environments help on both counts, since they start faster and more of them fit on each host. This is why short-lived workloads tend to run in containers or microVMs rather than full virtual machines.
A short-lived workload also suits a fresh sandbox for every run. Nothing it leaves behind affects the next run, which matters when the code comes from an agent or a stranger. Creating the sandbox from a clean image each time also makes runs repeatable, since every run starts from the same files. When a run needs data from an earlier one, that data has to be passed in on purpose.