Limits
View as MarkdownThis page lists what can surprise a team that runs Dex in production. Each item links to the page that covers it.
Three defaults need a change before launch.
- Closed runs are kept for 7 days. After that the server deletes the run with its Step history, and its Flow ID can start a new Flow.
- Public API authentication is off. Any client that reaches the server can call it until you configure an authenticator.
- Step retries stop after 4 hours. The Flow then fails, unless the Step has its own retry policy or a failure route.
The production checklist says how to change each one.
Capacity and availability
- One active node is the ceiling of a cluster. Dex divides a cluster's Flows and task queues into partitions, which are fixed slices of that state. One node owns every partition. So a larger load needs a larger node or a separate cluster. See Grow past one node and Performance.
- Failover takes up to the lease duration plus 1 second. The lease is 10 seconds by default. A single-replica setup should use 60 seconds, so it waits up to about a minute after a crash. A graceful shutdown hands over at once. See Lease.
- A stalled object store stops the node. A log write that object storage does not accept within its deadline stops the active node, and a standby takes over after the lease ends, if one is configured and can reach the store. The deadline is 10 seconds by default. See Lease.
- Failover fails in-flight attempts. A durably started attempt still in flight fails and counts against its retry policy. Another attempt runs if the policy allows it. An ASYNC attempt whose start was lost is dispatched again under the same attempt number and uses no retry. See Server Failover.
- The partition count is fixed at the first start. See Partition count.
- Some upgrades stop the cluster. Some server releases need every server process stopped, standbys included, before the new version starts. Upgrades roll forward only. The upgrades page names each such release, so read it before you upgrade. See Upgrades and compatibility.
Grow past one node
A cluster has one active node, so its capacity is one node's capacity. Two options:
- Use a larger node. The benchmark on a 16-vCPU node reaches several times the throughput of a 2-vCPU node. See Performance.
- Run separate clusters. Each cluster uses its own object storage prefix, since one prefix holds one cluster. Split Flows between clusters by Flow type, or by a business key such as the tenant. Point each service's Client and Workers at the cluster that owns its Flows.
Each cluster keeps its own Flows, and a Flow stays in the cluster that started it. A SubFlow starts in the same cluster as its parent, and RPCs and Channel messages reach only Flows in the cluster that the Client is connected to. See Install and configure server-zd.
Requests that can repeat
As in any durable execution engine, an interrupted Step runs again; see Idempotency keys. These requests can also repeat:
- An ASYNC Step can rerun on a new snapshot. If a server node fails before it saves an ASYNC Step's start, the attempt runs again and can read different Attribute values. See SYNC and ASYNC Steps.
- Calling an RPC again runs it again. By default, each SDK call sends a new request ID. A caller that passes the same request ID on every attempt gets the RPC's changes saved at most once; see RPC guarantees.
- A repeated Channel publish delivers twice. A
PublishToChannelrequest sent again after a lost response stores the message a second time. - A retried StopFlow without a run ID can stop a newer run. Pass the run ID.
Deduplicate commands gives the pattern that drops a repeated command.
Workers and code
- An RPC needs a Worker within 10 seconds. If no Worker takes it in that time, the caller gets an Unavailable error. Steps wait in a durable queue instead. See Routing and availability.
- A canceled method keeps running. Dex does not stop the code. The method should check for cancellation and return. See Stop a Flow.
- Parallel writers overwrite each other unless they lock. See Locks.
- Index slots are limited. With the PostgreSQL search backend, each tenant has 10 Keyword slots and 3 for each other index type, shared by every Flow type. The registry has no delete. See PostgreSQL search.
- One Flow run holds up to 1,000 active Steps and 1,000 pending messages in each Channel by default. A Step decision, RPC, or publish beyond either limit fails. Spread larger work across child Flows. See Step and Channel message limits.
Release status
| Part | Where it stands |
|---|---|
| Dex | Beta. Published APIs, configuration, wire formats, and stored data stay compatible. No support period for older releases is promised. |
| Dex Server (server-zd) | Version 0.1.x. Upgrades roll forward only, and some stop the cluster. |
| SDKs | Version 1.x, in Go, Python, Java, TypeScript, and Rust. |
| Dex Cloud | Super Durable runs Dex Server for you. Use Dex Cloud describes what it operates and what you run. |
| Compatibility | Decided by protocol ranges, not version numbers. A Worker or Client works with a server when their ranges overlap. |
Upgrades and compatibility gives the protocol ranges.
- Breaking changes come with a migration path.
- Some options are unsupported. A Flow start delay and a Flow-level retry policy are rejected; wait on a Timer in the first Step, and set retry policies per Step. An Attribute Store, the optional database that receives copies of chosen Attributes, can only be PostgreSQL. Flow state always stays in Dex Server. See Unsupported features.
- dexcli dev runs the dex-server-zd release bundled with it. See the CLI reference.
License
Dex is source-available under the Sustainable Use License 1.0, which is not an OSI-approved open source license. It lets you run Dex yourself under the terms below.
- You may use Dex for your own business operations, whatever your company's size.
- You may use Dex as hidden backend infrastructure for a commercial product. This holds when the product's value comes from other features, and its customers do not get direct access to a substantial set of Dex features.
- You may charge for consulting, installation, workflow development, and support.
- You need a commercial license to white-label, host, or resell Dex, or to build an automation, process, workflow, or software-building platform whose value comes entirely or mostly from Dex.
- You may distribute Dex or changes to it only free of charge and for non-commercial purposes.
Dex Skills are under the MIT License. The docs and examples keep their own licenses, and earlier material keeps its original license. The licensing guide explains these terms, and the license text in the repository is what applies. For questions or a commercial license, write to licensing@superdurable.io.
Next
- Correctness and Expressiveness: computer-checked proofs of what a crash can change.
- Performance
- Production checklist
- Server Failover