Skip to content

design review: CNPG, Qdrant and Valkey data boundaries #10

Description

@Sam123ben

Parent: #1. Related reviews: #2, #3, #4, #5, #7 and #9.

Decision

  • CloudNativePG Postgres is the authoritative transactional database.
  • GCS stores immutable source, page and full-result objects.
  • Qdrant stores rebuildable semantic-memory embeddings and bounded retrieval metadata.
  • Valkey stores TTL-bound cache entries, atomic admission counters and non-authoritative coordination hints.

No business fact exists only in Qdrant or Valkey. Canonical memory, chunks and evidence exist in Postgres/GCS before asynchronous indexing.

Consistency

Postgres business writes and outbox intent commit in one transaction. Idempotent consumers update Qdrant and invalidate/refill Valkey. Vector indexing and caches are eventually consistent and expose version/lag. Agent citations resolve each vector hit back to the authorized canonical document version.

Review checklist

  • Review tenant/RLS boundary for every Postgres table and Qdrant query.
  • Review CNPG three-instance multi-zone topology and Pooler transaction mode.
  • Verify SQLx pool sizing and disabled statement cache behind PgBouncer.
  • Approve WAL archive, base backup, PITR and restore targets.
  • Prove automatic failover and quarterly restore/failover exercises.
  • Approve Qdrant collection, tenant partition and embedding-version strategy.
  • Prove deterministic idempotent vector IDs and collection-alias reindex rollback.
  • Require TTL and schema/tenant namespace on every Valkey key.
  • Verify cache outage falls through and admission remains conservatively bounded.
  • Verify cross-store deletion remains pending until GCS, Qdrant and Valkey confirm removal.
  • Define storage, backup and cross-zone cost envelope.

Failure contract

  • CNPG outage pauses authoritative lifecycle work; no state is invented elsewhere.
  • Qdrant outage does not block OCR; indexing queues and semantic retrieval degrades explicitly.
  • Valkey outage increases latency and applies local admission ceilings; it never loses work.
  • GCS outage prevents result commit; Postgres cannot claim a missing result object.

Production manifests and IAM are GitOps-only through tesserix-k8s; this issue authorizes design review, not a live cluster mutation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions