When Not To Use DSM
DSM is for replicated coordination state inside a service family. It is not a replacement for every shared-data problem. Use this page as a quick boundary check before modeling new data in DSM.
Use Another System When
| Need | Better fit | Why DSM is wrong here |
|---|---|---|
| System-of-record business data | OLTP database | DSM repair converges coordination state; it does not provide transactional business storage. |
| Rich querying, filtering, joins, or secondary indexes | Database or search engine | DSM collections are key-oriented runtime state, not query engines. |
| Large document payloads | Object/document store | Large payloads amplify sync, repair, memory, and serialization cost. |
| Durable event history | Kafka, Pulsar, NATS JetStream, database outbox | ChangeStream is an observability surface, not a guaranteed-delivery log. |
| Cross-cluster ownership transfer | Purpose-built workflow or consensus layer | Federation forwards state; it does not transfer lease ownership semantics across clusters. |
| High-volume telemetry or analytics | Metrics/log/event pipeline | DSM metadata replication is not an analytics ingestion path. |
| Strong serializable coordination across partitions | Consensus service | DSM favors runtime availability and explicit repair; QUORUM leases narrow one ownership case but do not turn all DSM state into consensus. |
Good DSM Workloads
DSM is a fit when the data is small, operational, and coordination-oriented:
- route hints
- shard ownership
- active worker leases
- low-volume replicated configuration
- CRDT counters or mergeable operational state
- cross-cluster observation of selected control-plane state
Boundary Tests
Ask these before creating a collection:
- If this data is lost and repaired from peers, is the business still correct?
- Can the entity be read by key without rich query support?
- Is the payload small enough to replicate and repair frequently?
- Can schema compatibility be controlled during rollout?
- Does the chosen collection type match the actual coordination question?
If the answer to any of these is no, DSM may still be useful nearby, but it should not be the primary store for that data.