About hev layer

Layer was built to extend modern search offerings, by providing an opinionated set of abstractions.

It’s helpful to get familiar with these concepts before reading the detailed documentation.

Ink-and-watercolour drawing of a three-storey cutaway house: the hev mascot with his feet up at a desk in the attic office beside a stationary exercise bike, a burnt-orange machine floor of chains, cogs and gauges running by itself below him, and a stone-vaulted basement archive of bicycles hanging in rows, racks of tyres, shelves of parts and drawers of components. The same cutaway house at night: the windows glow, the hev mascot has his feet up at the attic desk in pyjamas under a lamp, the machine floor runs on by work-light below him, and a single bulb lights the basement archive.
Ink-and-watercolour drawing of the hev mascot in a cycling helmet and shoes, kneeling beside a mountain bike and holding a round tyre-pressure gauge to the front valve, watching the needle. Night version of the same drawing: the hev mascot out on a night mountain-bike ride, a helmet lamp and handlebar light throwing beams down the trail while he glances at the gauge in his hand.

Kubernetes Control Flow

A control loop is Layer's core primitive for managing an index. It reconciles the index's state against metrics coming back from the search system — which is how row-level transforms get applied and how a namespace's stable view stays current. You set the target; the loop notices the drift and closes it.

Ink-and-watercolour drawing of the hev mascot gripping a bicycle seatpost and sliding the saddle up out of the seat tube, the quick-release lever open and arrows showing it moving up and down. Night version: the hev mascot in a darkened room sliding a wall dimmer up and down, the pendant lamps above him brightening and fading with the slider.

Karpenter GPU Autoscaling

Because Layer is stateless, every tier scales independently. Karpenter handles nodes, KEDA scales pods against signals from an embedded PostgreSQL queue. That queue carries scaling signal only — no non-recoverable state — so a tier can drop to zero and come back with nothing to restore.

Ink-and-watercolour drawing of the hev mascot crouching at a bicycle in a repair stand, fitting a new orange chainring and cassette with a chain whip while the old drivetrain parts lie on the ground beside him. Night version: the same drivetrain swap, now in a dark workshop lit by a clamp work-lamp, the new orange chainring catching the light.

tpuf Wire Compatibility

Layer speaks the turbopuffer wire. Existing clients point at the gateway and keep working — same calls, same shapes, no rewrite. That compatibility is also what makes the store behind it a choice rather than a commitment: applications use the gateway API while the configured store handles storage and retrieval.

Ink-and-watercolour drawing of the hev mascot holding a handheld label gun and sticking a blank label onto a bicycle chainring, over an open parts bin of cogs, derailleurs and chains that already carry blank labels. Night version: the same labelling scene by the light of a headtorch, the parts bins receding into the dark behind the lit ones.

Envelope Decoration

The gateway extends your search system with query patterns and filtering primitives it doesn't ship. Enhancements ride on reserved _hevlayer_* attributes and degrade gracefully if the schema changes underneath them. It stays one API surface — Python, Go, TypeScript, or plain REST — so applications can route every call through Layer, including the ones needing nothing extra.

Ink-and-watercolour drawing of the hev mascot flinging small bicycle parts up toward a wall of open parts bins while catching them coming back down as one assembled wheel in a wire basket. Night version: the parts fly up into a wall of bins lit one by one as they are reached, the assembled wheel coming back down into the basket.

Scatter/Gather Index Sharding

Layer can partition a namespace into hash buckets — shards — by stamping each row with a reserved attribute. A query then scatters to every bucket in parallel and gathers the results, merging and re-ranking down to the top_k you asked for. Sharding stays invisible: you issue one query and get one ranked list back.

Ink-and-watercolour drawing of the hev mascot pulling one drawer from an enormous bicycle-shop wall of tiny parts drawers, a cog already in his other hand. Night version: the wall of drawers in darkness, the hev mascot wearing a headtorch, the one open drawer lit from inside.

NVMe Document Cache

The cache does two jobs from one store, and it is built on NVMe rather than RAM — Aerospike keeps its index in memory and the records themselves on local flash, so the cache holds far more than a memory-sized working set. Document reads are pull-through: check the cache, read through to origin on a miss, backfill best-effort. Pipeline chunk handoff uses the same store as the queue between CPU and GPU workers. Neither job is a hard dependency — reads fall through to origin, chunks fall back to S3.

What’s in the Box

Layer doesn’t reinvent the runtime. It composes proven open source and owns the seams between the pieces — so what you operate is a stack your team can already reason about, and every part of it is one you could have chosen yourself.

Karpenter handles node provisioning alongside these.

Ink-and-watercolour drawing of the hev mascot levering the lid off a wooden shipping crate with a crowbar, the crate packed with bicycle parts — a frame, wheels, handlebars, a chain, chainrings and cogs, a saddle and a coil of cable. The same crate at night, the lid coming off under moonlight with the packed bicycle parts lit by the glow spilling out of the crate.
esc