MatrixObject
A distributed object store, in Rust. Apache-2.0 open source: public, forkable,
and open to issues and pull requests from anyone.
Objects are stored across replicated nodes with quorum publication, versioned
manifests, per-page integrity checks, and explicit repair paths. New version 2
manifests authenticate page reads against committed SHA-256 digests; version 1
manifests retain exact quorum-voted reads. Configure repair workers explicitly;
automatic returning-node repair scheduling is not complete. See
authenticated reads and
repair scheduling.
Related Projects
On this page: Start here | Services |
Independent replicas | Building |
Configuration | Limitations |
Contributing.
All six projects are independently usable under Apache-2.0. Choose by workload
and execution model; installing one does not deploy the others.
| Project |
Use it for |
Execution model |
| MatrixObject (this repository) |
Distributed object storage |
Object API with separately configured metadata and replica services. |
| TemporalStore |
Temporal features, sequences, and context serving |
Serving engine with its own endpoints, persistence, and replication settings. |
| MatrixCache |
Tiered caching inside a Rust application |
Embedded library; the application owns authoritative data and network requests. |
| MatrixRaft |
Consensus inside a service |
Embedded library; the host supplies transport and state-machine application. |
| MatrixArk |
Context ingestion, retrieval, and feedback |
Python runtime with explicitly configured storage and model providers. |
| MatrixAdsDemo |
Exploring an ads retrieval and auction pipeline |
Standalone generated-data demonstration, not an object-store workload. |
For this store's service topology and build features, start with
Deployment Responsibilities.
Getting Help
Search public issues before
opening a report. Include the revision, enabled Cargo features, service topology,
replica and quorum settings, object size, and the API operation involved. Describe
whether a write was acknowledged, published, or awaiting placement; for reclamation,
distinguish deleted objects from physical bytes returned to storage.
Use synthetic object keys and payloads. Remove credentials, tokens, and private
certificates from configuration excerpts. Follow the security policy
for sensitive reports, not a public issue. For code or documentation changes,
start with CONTRIBUTING.md.
Implementation entry points
These are distinct implementation entry points, not a ready-made cluster configuration.
Use the deployment guides below to select durable storage, network endpoints, peer
membership, and security settings before starting independent processes.
Start Here
For performance sizing, record object and range sizes, replica/quorum settings,
metadata topology, and acknowledgement boundary. Separate upload throughput from
publication latency and repair traffic. Logical deletion is not physical space
reclamation: account for retained versions, active read leases, and pending reclaim
before interpreting storage amplification. The guides below describe these paths.
The object store is a cluster: a metadata quorum, chunk groups and the doors that serve them run as
separate processes. There is no in-process store to embed. Building the service binaries does not
configure remote placement, metadata consensus, TLS, or repair scheduling. Select and configure those
paths explicitly using the guides above; local multi-process results are not independent-host
production qualification.
Objects are stored as chunk manifests (see chunk-granular manifests
and the gateway). Data directories from earlier builds are not supported:
a door refuses to start over a cluster that still holds page-granular objects, and there is no migration.
Deployment Responsibilities
Build features are not deployment modes
The default Cargo features include raft-rs, http-server, replica-server,
and meta-server. They make the corresponding APIs and binaries available;
they do not turn an in-process store into independent durable voter groups.
| Opt-in feature |
Purpose |
metadata-consensus |
Independent MatrixRaft voters for metadata requests |
chunk-consensus |
Independent MatrixRaft voters for chunk groups |
api-tls |
TLS support for the binary service APIs |
For the independent consensus features, use Rust 1.89 or newer and install the
Protobuf compiler, Autoconf, Automake, and Libtool before building. The metadata
API and Raft peer transport use separate ports; reserve both in each voter's
network configuration. See the metadata deployment guide
for process-specific settings rather than sharing a state directory between voters.
From the repository root, build these paths together with:
cargo build --locked --release --features metadata-consensus,chunk-consensus,api-tls
Configure endpoints, group identities, durable directories, and TLS credentials
using the guides above before starting services. Each voter needs exclusive
ownership of its own durable files. Enabling features alone does not create
replicas or establish quorum availability.
Configure the services
| Layer |
Configure before relying on it |
| Object API |
Request authentication, TLS, request budgets, and the network endpoint |
| Metadata service |
Durable voter storage, membership, quorum availability, and recovery |
| Chunk and page services |
Independent replica placement, persistence, and repair scheduling |
| Reclamation |
Reader protection, stale-range handling, and the work needed to reclaim storage |
Keep acknowledgement, publication, and reclamation separate: accepting staged data does not
by itself publish an object, and deleting metadata does not immediately return physical
space. Use the manifest, lease, and repair guides above when choosing recovery and capacity
policies. A local embedding example does not exercise these independent service boundaries.
Deployment and Upgrade Checklist
- Choose metadata and chunk consensus features explicitly, then configure their
independent processes, identities, ports, and durable directories. Building all
binaries is not a cluster deployment.
- Preserve metadata checkpoints and journals together with the data replicas
they describe. An object API process alone is not a backup of the store.
- Upgrade protocol consumers before enabling nonempty namespace fences. Consult
the linked protocol guides for refused operations rather than assuming an older
peer will transparently downgrade.
- Budget separately for published objects and repair work. A delete publishes a
tombstone; the pages no manifest names are freed by the reclaim sweep after its
grace, not by the delete.
- Use distributed delivery to distinguish local
multi-process behavior from independent-host availability and capacity claims.
How storage is laid out
An object is a manifest of chunk extents (see chunk-granular manifests): runs of pages in a chunk of a replica group, with a digest the manifest commits to.
Storage units
| tier |
default size |
what it is |
| chunk |
64 MiB |
the append-only container objects are allocated from |
| page |
1 MiB |
the replicated unit: what a quorum votes on and what repair rebuilds |
| fragment |
derived |
the pieces an erasure code splits one page into, plus its redundancy piece |
An object becomes one or more extents — a (chunk, offset, length) range,
each at most max_extent_bytes — and an extent maps onto the pages covering
it by page_index = absolute_offset / page_size. So a ranged read fetches
only the pages it needs instead of scanning a chunk, and a repair rebuilds one
page rather than a whole container.
shard is used in the distributed sense only -- metadata partitioned by key
range across services. The pieces inside one page are fragments: they never
leave the page they came from. The service coordinating a chunk's replicas is the
chunk service; the one holding a single replica is the replica service.
Two classes of name are still spelled the old way on purpose, because the text
itself is load-bearing rather than cosmetic:
| still named the old way |
why it stays |
151 durable format constants (36 contain BLOCK, 3 SEGMENT) |
they are hashed into proofs, so changing the text changes every checksum computed from it |
| 154 control-field and report keys |
they are observable output -- someone's dashboard reads them |
Both are a versioned migration rather than a rename, and
every_durable_format_constant_is_accounted_for pins all 151 by name in both
directions: a renamed constant fails it, and so does a new one. The second count
is distinct lower-case literals containing block or segment; counted another
way it differs, which is why the definition is here and not only the figure.
The directories src/services/page and src/services/chunk hold the chunk
service and the replica service respectively, and move in a later change; the
types and fields are already ChunkId, chunk_size, PageId, page_size.
Services
| service |
responsibility |
| meta |
object metadata, leases, key-range shards, transactions, the change feed |