Hq-ts
❌ “Isn’t TimescaleDB with PostgreSQL replication enough?” → Streaming replication is async by default. HQ requires synchronous commit to 3 nodes before ack.
| If regular TSDB is… | Then HQ-TS is… | |---------------------|----------------| | A notebook for temperatures | A flight recorder on a space shuttle | | 99.9% accurate | 99.999% with cryptographic proof | | “We’ll fix missing points later” | “Every nanosecond is accounted for” | | Layer | Recommended tech | Why |
| Test | Expected HQ behavior | |------|----------------------| | Kill leader node mid-write | Client gets retryable error, write succeeds on new leader within 2 sec | | Corrupt one disk’s WAL | Database detects checksum mismatch, repairs from other replicas | | Delay network 500ms between nodes | Writes still commit (higher latency but no loss) | | Replay same write 100x | Only 1 stored point, idempotent key wins | | Query across a 6-hour gap | Repair job finds gap, marks it as “inferred” vs “original” | If you’re building an HQ-TS system today: HQ-TS needs continuous repair and quorum writes
Think of it as: “How to keep your IoT sensors, stock prices, or server metrics alive, accurate, and never missing a beat.” HQ-TS isn’t a single product—it’s a design pattern for time-series databases (TSDBs) where data integrity and uptime are non-negotiable. or server metrics alive
| Layer | Recommended tech | Why | |-------|----------------|------| | TSDB core | cluster + -dedup.minScrapeInterval | Excellent replication + dedup | | Strong consensus | etcd or NATS JetStream for WAL | Reliable, fast, proven | | Idempotent writes | Kafka with key-based compaction | Perfect for replayed data | | Gap detection | Custom Python/Go job + PromQL absent() | Finds missing intervals | | Provenance | Sigstore or AWS KMS per batch | Tamper-evident logs | Quick start: Run VictoriaMetrics in cluster mode with -replicationFactor=3 , feed writes through a small Go gateway that adds a UUID + SHA256. 7. The “Wait, but why not just…” Mythbusters ❌ “Can’t I just use InfluxDB + backups?” → Backups are point-in-time. HQ-TS needs continuous repair and quorum writes .