Document model
A row has an id, application attributes, and optionally a vector. Supply
these fields in write requests.
Reserved attributes
The _hevlayer_* prefix belongs to the gateway. Do not set these attributes
in client writes. Select your backend to see which attributes Layer manages.
| Attribute | Type | Purpose |
|---|---|---|
_hevlayer_upserted_at | integer (epoch ms) | Server-stamped on row-producing writes through Layer. Records when the gateway received the write. |
_hevlayer_shard | integer | Hash bucket stamped on every row Layer writes (xxh64(id) % shard_count). The count is the namespace’s shard marker, or LAYER_SHARD_COUNT (default 16) before one exists. Not related to Turbopuffer’s own sharding. Lets the gateway scatter/gather a query across the shards of one namespace. |
Initialize an existing namespace with layer init <namespace> --shards N
to backfill rows written before Layer. Scatter/gather starts after
layer.shard_lag_rows reaches zero.