---
title: "Production checklist"
description: "A checklist for running Dex in production, with a link to the page that covers each item, from the server topology and capacity to backup, upgrades, and monitoring."
canonical_url: "https://docs.superdurable.io/production-operations/production-checklist/"
source: "docs/content/components/production.mdx"
locale: "en"
---

> Index of every page for AI agents: https://docs.superdurable.io/llms.txt

# Production checklist

Check each item before launch. Each item links to the page with the details.
In [Dex Cloud](https://superdurable.io/dex-cloud/), Super Durable runs the server; the Worker, Step retry,
code-change, and database items still apply.

<a id="smallest-deployment"></a>

<a id="defaults-to-change-before-production"></a>

<a id="retention"></a>

<a id="sizing"></a>

<a id="before-you-launch"></a>

## Before you launch

| Item                   | What to do                                                                                                                                         | Details                                                                                                                                                                                                                |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authentication and TLS | Authentication is off by default and the API is plaintext gRPC: configure an authenticator, and put TLS in front or keep the port private.         | [Authentication](https://docs.superdurable.io/reference/server/authentication.md), [TLS](https://docs.superdurable.io/reference/server/authentication.md#tls)                                                          |
| Payload encryption     | Turn it on when the server and its storage must not read your values.                                                                              | [Payload encryption](https://docs.superdurable.io/production-operations/production-checklist.md#payload-encryption)                                                                                                    |
| Topology               | Run one active node; add a hot standby for fast failover.                                                                                          | [Self-host Dex Server](https://docs.superdurable.io/reference/server/configuration.md#install-and-start), [Lease, hot standby, and step down](https://docs.superdurable.io/reference/server/high-availability.md)      |
| Storage and backup     | Version or replicate the bucket prefix, and practice a restore.                                                                                    | [Backup and restore](https://docs.superdurable.io/reference/server/object-storage.md#backup-and-restore)                                                                                                               |
| Retention              | Keep closed runs longer than your longest client retry; copy data you need longer to your own database.                                            | [Retention](https://docs.superdurable.io/reference/server/configuration.md#retention), [Entity Flow with Attribute Sync](https://docs.superdurable.io/design-patterns/data-storage/entity-flow-with-attribute-sync.md) |
| Monitoring             | Serve metrics; alert on a node that is not serving and on failed lease renewals.                                                                   | [Metrics and alerts](https://docs.superdurable.io/reference/server/metrics.md#alerts)                                                                                                                                  |
| Workers                | Size task slots, and stop Workers gracefully in a deploy.                                                                                          | [Size Worker slots](https://docs.superdurable.io/production-operations/production-checklist.md#worker-slots)                                                                                                           |
| Step retries           | Step retries end after a time limit, and then the Step's failure policy applies; by default the Flow fails. Set a retry policy or a failure route. | [Limits](https://docs.superdurable.io/evaluate-dex/limits.md)                                                                                                                                                          |
| Upgrades               | Read each release's notes before you upgrade.                                                                                                      | [Upgrades](https://docs.superdurable.io/reference/server/upgrades.md), [Agent release notes](https://docs.superdurable.io/reference/agents/upgrades.md#release-notes)                                                  |
| Code changes           | Keep old Step types and RPCs while active runs or approved Time Travel can reach them.                                                             | [Deploy Code Changes](https://docs.superdurable.io/production-operations/deploy-code-changes.md)                                                                                                                       |
| Your database          | Make writes from Steps safe to repeat: upsert by Flow ID.                                                                                          | [Idempotency keys](https://docs.superdurable.io/concepts/step.md#idempotency-keys)                                                                                                                                     |
| Search backend         | Use PostgreSQL or ParadeDB for heavy search.                                                                                                       | [Search backends](https://docs.superdurable.io/reference/server/search.md)                                                                                                                                             |
| Kubernetes             | Run the server as a StatefulSet with graceful shutdown.                                                                                            | [Kubernetes deployment](https://docs.superdurable.io/reference/server/kubernetes.md)                                                                                                                                   |
| Capacity               | Start small and watch the server's CPU.                                                                                                            | [Size a server node](https://docs.superdurable.io/reference/server/configuration.md#size-a-server-node), [Find the bottleneck](https://docs.superdurable.io/reference/server/workers.md#find-bottleneck)               |

<a id="worker-slots"></a>

### Size Worker slots

A Worker's task slots cap how many Steps and RPCs it runs at once. I/O-bound
handlers, such as model calls, HTTP, and database queries, need many slots.
CPU-bound handlers need about one slot per allocated CPU. In containers, set
the slot count and the floor explicitly, because the CPU count can show the
whole host. [Choose the slot count](https://docs.superdurable.io/reference/server/workers.md#choose-slot-count)
gives the defaults.

<a id="minimal-configuration"></a>

## Minimal configuration

This configuration runs one Dex Server node on Amazon S3, with authentication on:

```yaml
cluster:
  nodeId: dex-zd
objectStore:
  region: us-east-1
  bucket: BUCKET
  prefix: PREFIX
localStorage:
  directory: /var/lib/dex-server-zd/store
lease:
  duration: 60s
retention:
  closedFlowDuration: 7days
metrics:
  listen: 0.0.0.0:9090
auth:
  authenticators:
    - kind: staticTokens
      file: /etc/dex-server-zd/tokens.yaml
```

Replace `BUCKET` and `PREFIX` with your bucket and key prefix. The token file
lists SHA-256 hashes of the bearer tokens; [Authentication](https://docs.superdurable.io/reference/server/authentication.md)
shows its format and the JWT option. The 60-second lease suits one node; with
hot standbys, keep the default.
[Install and configure server-zd](https://docs.superdurable.io/reference/server/configuration.md#minimal-production-configuration)
explains every key.

Give each Worker and Client its token through the SDK's `credential` option. A
file credential rereads its file, so a rotated token needs no restart. See
[Send credentials from Workers and Clients](https://docs.superdurable.io/reference/server/authentication.md#sdk-credentials).

<a id="payload-encryption"></a>

## Payload encryption

TLS and payload encryption protect different things.

- **TLS** protects values on the network up to the TLS endpoint in front of
  the server. Dex Server receives plaintext gRPC from that endpoint.
- **Payload encryption** encrypts values in your Workers and Clients, with your
  codec and keys, before they are sent. The server and its storage hold them as
  ciphertext and never hold the keys.

Use both when the server, its storage, or its operators must not read your
data. These rules apply:

- With a codec, the SDK encrypts eligible values, such as Step, Channel,
  Stream, and RPC values. Indexed and plaintext Attributes stay plaintext, and
  so do values stored before you enabled the codec.
- Names and IDs stay plaintext: Flow types and IDs, Step types, RPC names,
  Attribute and index keys, Channel and Stream names, request IDs, and task
  queues. Keep sensitive data out of them.
- Keep an Attribute plaintext when Dex must compare, index, or project its
  decoded value: Attribute-match waits, Action conditions, search, and typed
  Attribute Store columns. Indexed writes are plaintext automatically; declare
  every other such Attribute plaintext. Store sensitive values in other
  Attributes, which stay encrypted.
- With a codec, the Client rejects an Attribute-match wait on an Attribute
  that it would encrypt, before it sends the wait. Always declare the
  Attributes that Action conditions use plaintext.
- Every Worker and Client of the application uses an SDK with payload
  encryption, the same codec and keys, and the same plaintext declarations.
- Make every reader able to decrypt before any writer writes ciphertext. A
  Worker that cannot decrypt a Step value fails that attempt.

The [Payload encryption reference](https://docs.superdurable.io/reference/server/payload-encryption.md) lists
what the server can see, the setup for each SDK, codec servers for Dex Web and
dexcli, rollout and key rotation, and the limits.

<a id="agents"></a>

## Agents

Agent sessions run on the same Dex Server as every other Flow, so the items above apply. These items are what agents add:

| Item                  | What to know                                                                                                                                   | Details                                                                                                          |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Credentials           | Keep model API keys and tool credentials in the Worker's environment or a secret store, never in session input or messages.                    | [Credentials](https://docs.superdurable.io/reference/agents/credentials.md)                                      |
| Transcripts           | Copy transcripts you must keep to your own store, because Dex can purge a stopped session after the retention period.                          | [History and retention](https://docs.superdurable.io/reference/agents/session-limits.md#history)                 |
| Unknown outcomes      | Decide who reconciles a call recorded as `outcome_unknown` before anyone asks for the effect again.                                            | [Reconcile outcome_unknown](https://docs.superdurable.io/reference/agents/failures.md#reconcile-outcome-unknown) |
| Upgrades              | Stop every older Worker gracefully before new ones start when a release is marked incompatible.                                                | [Upgrades](https://docs.superdurable.io/reference/agents/upgrades.md#in-flight-calls)                            |
| Calls during a deploy | Back off while no Worker runs, because session RPCs need one. A `send_user_message` retried with a new request ID can queue the message again. | [RPCs during a deploy](https://docs.superdurable.io/reference/agents/upgrades.md#rpcs-during-a-deploy)           |
| Workers               | Size Workers for parallel tool calls: each running model call, tool call, and RPC holds a task slot.                                           | [Workers and timeouts](https://docs.superdurable.io/reference/agents/workers.md)                                 |
| Session size          | Keep a session below the state limit with compaction and message retention where the harness has them.                                         | [Session limits](https://docs.superdurable.io/reference/agents/session-limits.md)                                |
| Model spend           | Check spend per account or API key around each model call in your own code.                                                                    | [Spend limits](https://docs.superdurable.io/reference/agents/spend-limits.md)                                    |
| Approval deadlines    | Set a deadline when a call must not wait forever for a person.                                                                                 | [Approval deadlines](https://docs.superdurable.io/reference/agents/approvals.md#approval-deadlines)              |
| Streaming             | Size the AgentEvents Stream for your traffic.                                                                                                  | [AgentEvents Stream](https://docs.superdurable.io/reference/agents/event-stream.md)                              |
| Tracing               | Install an OpenTelemetry SDK and exporter to receive the spans that sessions emit for each model call and tool call.                           | [Tracing](https://docs.superdurable.io/reference/agents/tracing.md)                                              |

<a id="deployment-shape"></a>

### Agent deployment

An agent app runs three kinds of process:

- **Web app replicas** hold a Client. They start sessions, send messages, and stream replies. They register the session Flow's definition to encode calls, but never run a Step.
- **Worker processes** run the session Flow: every model call, tool call, and approval wait. A small deployment can run the Worker in its web app process, as the [web app example](https://docs.superdurable.io/reference/agents/agent-sdk-adapters.md#web-handler) does.
- **Dex Server** keeps every session. Workers connect out to it, so they need no inbound port.

## Next

- [Deploy Code Changes](https://docs.superdurable.io/production-operations/deploy-code-changes.md): change Flow code while runs are still open.
- [Operate and Debug](https://docs.superdurable.io/production-operations/operate-and-debug.md): find a Flow, fix one that is stuck or failed, and recover it.
