# Evaluate replication locally

This guide covers the development build's **fixed three-voter local shard**. It is a separate mode from the standalone quickstart, not a production cluster deployment recipe.

## Initialize fresh directories

From the source checkout:

```sh
cargo run -p smts-server -- --init-cluster ./cluster-data
```

The helper writes node configuration and prints startup commands. Use a fresh root; do not repurpose existing standalone storage.

## Start three processes

Run each command in a separate terminal:

```sh
cargo run -p smts-server -- --config ./cluster-data/node-1/config.toml
```

```sh
cargo run -p smts-server -- --config ./cluster-data/node-2/config.toml
```

```sh
cargo run -p smts-server -- --config ./cluster-data/node-3/config.toml
```

Client ports are 9071–9073 and peer ports are 9171–9173. Wait for election and use `/readyz` to find the leader. Followers return a 409 leader hint for operations that require the leader.

## Write to the leader

Use the same `/write` and `/query` request formats as the standalone guides, but send them to the current leader's client port. In this mode, HTTP 204 requires quorum commit and durable leader application.

Do not reinterpret a standalone local-fsync acknowledgment as quorum durability. A leadership change does not make an uncertain client write safe to replay automatically.

## Inspect the operational boundary

Checkpoint catch-up, pruning, and controlled replica replacement have their own state and limits. Replacement keeps a three-voter membership; starting a fourth directory does not itself add a voter.

The local initialization workflow and peer network are intended for loopback evaluation. Cross-host deployment, fixed sharding, authentication, and backups require the matching mode-specific source configuration. Consult the repository's cluster contracts before changing topology.

## Next steps

Keep an inventory of node identities, ports, data paths, and the exact source revision. Verify restart behavior before fault testing. Use temporary directories and do not remove node identity files to resolve a configuration error.

For a workload review or deployment planning, [contact the maintainers](mailto:info@simplemagic.com?subject=SMTS%20deployment).
