# `Slap.Cluster.Strategy.Local`
[🔗](https://github.com/mjrusso/slap/blob/slap_cluster-v0.4.0/slap_cluster/lib/slap/cluster/strategy/local.ex#L1)

Places every shard on this node. For single-node deployments, development
and CI.

There is no failover: if the node goes down, its shards are unavailable
until it restarts. Run one instance (for example a Kubernetes Deployment
with `replicas: 1` and `strategy: Recreate`).

A shard that fails to open, crashes or is fenced is opened again after an
exponential backoff. Fencing in this mode means a second instance opened
the shard, which is logged at error level; the two instances then keep
taking the shard from each other, slowly, until one stops. SlateDB's
fencing keeps the data safe meanwhile.

Options:

  * `:backoff_base` - the first retry delay in ms (default 1,000).
  * `:backoff_max` - the longest delay in ms (default 60,000). A shard
    that stays up this long starts again from `:backoff_base`.
  * `:max_concurrency` - shards opened at once (default 16).
  * `:shards` - the shards to open here (default all of them).
    `Slap.Cluster.Strategy.Static` uses it.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
