Architecture
import SignalFlow from ‘../../../components/SignalFlow.astro’; import { Aside } from ‘@astrojs/starlight/components’;
PulsusDB is a stateless translation and coordination layer around ClickHouse. It accepts telemetry, applies signal-specific validation and modeling, and compiles familiar observability queries into ClickHouse-native SQL.
Process model
Section titled “Process model”One binary runs in three modes:
all mode combines both responsibilities.all embeds both responsibilities and rule evaluation. writer and reader modes let operators scale ingest and query independently behind separate load balancers.
Writer path
Section titled “Writer path”- Receive OTLP, Prometheus remote write, or an enabled compatibility protocol.
- Decompress and decode the request with explicit limits.
- Normalize labels and attributes into the signal’s canonical model.
- Compute stream or series fingerprints.
- Apply backpressure before allocating or queuing unbounded work.
- Insert one deduplicated landing block into ClickHouse.
- Let materialized views route the block into purpose-built tables.
The writer can acknowledge synchronously or queue async insertion, controlled globally and per request.
Reader path
Section titled “Reader path”- Parse LogQL, PromQL, or TraceQL.
- Validate language and resource budgets.
- Resolve candidate streams or series through index tables.
- Select raw or rollup tables while preserving query semantics.
- Generate ClickHouse SQL with time bounds pushed into
PREWHERE. - Run partial aggregation close to the data.
- Complete any language semantics that are unsafe to lower into SQL.
ClickHouse owns state
Section titled “ClickHouse owns state”ClickHouse stores telemetry, label indexes, rollups, rules, and schema metadata. PulsusDB processes can therefore be replaced or horizontally scaled without local durable state. Optional disk spooling protects writes during insertion failures, but it is not the system of record.
Cluster model
Section titled “Cluster model”In a clustered deployment:
- local tables use replicated ClickHouse engines;
- distributed wrapper tables fan reads and writes across shards;
PULSUS_CLUSTERenables cluster-aware schema rendering;- readers target the distributed suffix configured by
PULSUS_DIST_SUFFIX; - multiple ClickHouse HTTP endpoints can be configured for zone-aware connection spreading.
Schema ownership
Section titled “Schema ownership”The server never creates the database automatically. schema/schema.sh owns creation and reads schema-specific variables such as retention. At startup, PulsusDB checks that the configured database and required objects exist before reporting ready.