# Workload concepts

> Workload concepts - Object model, lifecycle states, protons, lifetime policies, and the draft vs.
> locked decision.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-07-30T11:40:01.816829+00:00` (UTC).

## Primary page

- [Workload concepts](https://docs.datarobot.com/ja/docs/workload-api/create-workloads/workload-concepts.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [Object model](https://docs.datarobot.com/ja/docs/workload-api/create-workloads/workload-concepts.html.md#object-model): In-page section heading.
- [Lifecycle states](https://docs.datarobot.com/ja/docs/workload-api/create-workloads/workload-concepts.html.md#lifecycle-states): In-page section heading.
- [Lifetime policies](https://docs.datarobot.com/ja/docs/workload-api/create-workloads/workload-concepts.html.md#lifetime-policies): In-page section heading.
- [Draft (ephemeral)](https://docs.datarobot.com/ja/docs/workload-api/create-workloads/workload-concepts.html.md#draft-ephemeral): In-page section heading.
- [Locked (persistent)](https://docs.datarobot.com/ja/docs/workload-api/create-workloads/workload-concepts.html.md#locked-persistent): In-page section heading.
- [Choose draft vs. locked](https://docs.datarobot.com/ja/docs/workload-api/create-workloads/workload-concepts.html.md#choose-draft-vs-locked): In-page section heading.
- [有用性](https://docs.datarobot.com/ja/docs/workload-api/create-workloads/workload-concepts.html.md#importance): In-page section heading.
- [共有](https://docs.datarobot.com/ja/docs/workload-api/create-workloads/workload-concepts.html.md#sharing): In-page section heading.

## Documentation content

A Workload is the logical unit of the Workload API: a stable identity, an invoke endpoint, and the governance wrapper around one or more running container instances (protons). Workloads are what you create, monitor, share, and tear down.

## Object model

A Workload always has at least one proton. During a replace operation it can temporarily have two—active and candidate. High-availability Workloads can run multiple protons permanently.

A Workload is created with `POST /workloads/`, either with an inline artifact spec or a reference to an existing `artifactId`.

## Lifecycle states

Workloads report a user-facing `WorkloadStatus` derived from the primary proton's `ProtonStatus` —the Workload view collapses internal proton-only states ( `initializing`, `warming`, `draining`, `restarting`) into adjacent Workload-visible states. The following table lists proton-level sequences for create, update, replace, stop, failure, and promote operations:

| 操作 | Transition |
| --- | --- |
| 作成 | submitted -> provisioning -> launching -> running |
| 更新 | running -> initializing -> running |
| 置換 | running -> running(active) + initializing/warming/running(candidate) -> switch -> draining(active) + running(new active) -> running(single active) |
| 停止 | running -> stopping -> stopped |
| 失敗 | initializing \| running -> errored |
| プロモート | running (draft) -> running (locked) (no restart) |

The platform derives these states from the Kubernetes pods backing the Workload's protons. For the full `WorkloadStatus` and `ProtonStatus` enums, pod-state predicates, multi-replica worst-state-wins aggregation, and the proton runtime backing, see [Lifecycle states](https://docs.datarobot.com/ja/docs/workload-api/operate-workloads/lifecycle-states.html.md).

## Lifetime policies

A Workload's lifetime is determined by the status of the artifact it references. A [draft artifact](https://docs.datarobot.com/ja/docs/workload-api/create-workloads/workload-concepts.html.md#draft-ephemeral) supports only one active Workload at a time. A [locked artifact](https://docs.datarobot.com/ja/docs/workload-api/create-workloads/workload-concepts.html.md#locked-persistent) can serve any number of Workloads simultaneously—useful for multi-region or multi-tenant deployments.

### Draft (ephemeral)

Draft Workloads are short-lived and tied to a single iterating artifact. They carry an 8-hour TTL (time-to-live)—a countdown that auto-terminates the Workload 8 hours after creation, freeing the resources for other work and allowing iteration without manual cleanup.

| ポリシー | 動作 |
| --- | --- |
| Auto-cleanup | Terminates 8 hours after creation (the TTL). |
| タイマーの再起動 | TTL resets to 8 hours each time you restart the Workload. |
| Workloads per artifact | At most one active Workload per draft artifact. |

### Locked (persistent)

Locked Workloads run indefinitely against an immutable artifact and require an explicit importance. They have no TTL—they run until you stop or delete them, or until you replace them with a new artifact.

| ポリシー | 動作 |
| --- | --- |
| Lifetime | Runs until explicitly stopped or deleted. |
| 監視データの保持 | 30 days. |
| importance | Optional; defaults to low. A priority hint the platform uses for resource prioritization and operational triage when the cluster is under contention. Does not affect routing, autoscaling, or QoS guarantees—it is a governance signal. Values: critical, high, moderate, low. |
| Workloads per artifact | Multiple Workloads can share one locked artifact. |

### Choose draft vs. locked

For the artifact-side definitions—what `draft` and `locked` mean as artifact statuses, how to lock, and the one-way rule—see [Artifact lifecycle](https://docs.datarobot.com/ja/docs/workload-api/build-artifacts/artifacts-concepts.html.md#artifact-lifecycle).

| Dimension | Draft artifact Workload | Locked artifact Workload |
| --- | --- | --- |
| Mutability | Artifact spec can change while you iterate. | Artifact is immutable after lock. |
| Lifetime | 8-hour TTL from creation; timer resets when you restart the Workload. | Runs until you stop or delete it. |
| importance | Optional; defaults to low. | Optional; defaults to low. Set explicitly for production Workloads. |
| Workloads per artifact | At most one active Workload per draft artifact. | Many Workloads can share one locked artifact. |
| Replace rules | Replace with another draft artifact when swapping experiments. | Replace with another locked artifact for controlled production rollouts. |
| Promotion | Use POST /workloads/{id}/promote to move the same Workload identity to production semantics. | Not applicable—already on the locked path. |

Use a draft artifact Workload for active development and iteration. Use a locked artifact Workload for production services that need a stable endpoint.

See also [Artifact lifecycle](https://docs.datarobot.com/ja/docs/workload-api/build-artifacts/artifacts-concepts.html.md#artifact-lifecycle) and [Promote to production](https://docs.datarobot.com/ja/docs/workload-api/update-workloads/promote-production.html.md).

## 有用性

`importance` is a priority hint used for resource prioritization and operational triage under contention (default `low`). It does not change routing or autoscaling targets by itself.

| 有用性 | 使用するタイミング |
| --- | --- |
| low | Internal tooling, dev Workloads, low-stakes services. |
| moderate | Internal services with limited blast radius. |
| high | User-facing services that are intended to be hard to evict. |
| critical | Mission-critical Workloads; do not evict. |

`importance` is mutable on a running Workload ( `PATCH /workloads/{id}` with `{"importance": "..."}`).

> [!NOTE] 可用性の保証
> `importance` は、高可用性の配置や稼働時間の保証には影響しません。 可用性は、ランタイム設定によって完全に決定されます。ダウンタイムを発生させずに単一のレプリカの障害に耐えられるようにするには、 `replicaCount` を2以上に設定するか、 `minReplicaCount >= 2` を指定してオートスケーリングを使用してください。 レプリカの設定で提供される範囲を超える、プラットフォームレベルのSLA保証はありません。

## 共有

Workloads support shared roles via `PATCH /workloads/{workload_id}/sharedRoles`. A shared role grants a specific access level on the Workload (the `SubjectType` values are `user`, `group`, `organization`, and `role`). ロールは `SharingRole` 列挙型を使用します。ほとんどの連携では `OWNER` 、 `USER` 、または `CONSUMER` を使用します。 Shared roles propagate to events, statistics, and the `/protons/` sub-resource. The artifact backing the Workload has its own sharing policy ( `PATCH /artifacts/{artifact_id}/sharedRoles`).

```
curl -X PATCH "${DATAROBOT_ENDPOINT}/workloads/${WORKLOAD_ID}/sharedRoles" \
  -H "Authorization: Bearer ${DATAROBOT_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "updateRoles",
    "roles": [{"id": "USER_ID", "role": "EDITOR", "shareRecipientType": "user"}]
  }' 
```

For the full role list, propagation, and recipient identification options, see [Sharing and access control](https://docs.datarobot.com/ja/docs/workload-api/operate-workloads/sharing-access-control.html.md).
