The shards that hold the rows, a Slap.Cluster. A partition's rows are
on shard shard_for(partition). Each shard runs partition writers,
each the only process that writes its own
subset of the shard's partitions. Set
child_options: [partition_writers: n] on the cluster (default 16).
Run one instance of this built-in cluster per VM. It can own many shards
and participate in a cluster across VMs. The same VM can also run
Slap.Streams.Cluster.
To configure a cluster under your application's name, define a module
with use Slap.KV.Cluster, otp_app: :my_app, supervise that module in
place of Slap.KV.Cluster, and pass cluster: MyApp.KVCluster to KV
operations and Slap.KV.HTTP.Router. Run one KV cluster per VM; peer
discovery is node-wide.
Configure it like any Slap.Cluster:
config :slap_kv, Slap.KV.Cluster,
store: {:url, "s3://bucket/prefix", aws_endpoint: "https://rustfs:9000"},
path: "kv",
shards: 8Durable writes wait for SlateDB's next WAL flush. This cluster sets
flush_interval to 10 ms; SlateDB's default is 100 ms. Other settings
leave the 10 ms default intact. The README describes the latency and
object-store request trade-off.
Give the cluster its own :path when it shares a store with another
cluster.
Summary
Functions
Defines a KV cluster under the given :otp_app.
Where every shard is. See Slap.Cluster.assignments/1.
Runs a function with a shard's context. See Slap.Cluster.call/4.
The shards open on this node.
Where a shard is. See Slap.Cluster.lookup/2.
The shard for a placement key. See Slap.Cluster.shard_for/2.
Starts the cluster. opts override the application environment, which
overrides the :defaults given to use Slap.Cluster.
Stops the cluster on this node, closing its shards.
A name for a per-shard process. See Slap.Cluster.via/3.
Functions
Defines a KV cluster under the given :otp_app.
Where every shard is. See Slap.Cluster.assignments/1.
Runs a function with a shard's context. See Slap.Cluster.call/4.
The shards open on this node.
Where a shard is. See Slap.Cluster.lookup/2.
The shard for a placement key. See Slap.Cluster.shard_for/2.
Starts the cluster. opts override the application environment, which
overrides the :defaults given to use Slap.Cluster.
Stops the cluster on this node, closing its shards.
A name for a per-shard process. See Slap.Cluster.via/3.