ADR-0018: Non-Functional Targets (Capacity, Availability, Security)¶
- Status: accepted
- Date: 2026-06-18
- Deciders: Nicolas Burri
- Relates to: ADR-0005, ADR-0009, ADR-0016; GAP-08/09/10
Context¶
No non-functional targets were specified, and arc42 §10 was a stub. Quantified targets are needed to validate the architecture (single PostgreSQL + pgvector, ADR-0005), to give CSV something to verify against, and to scope operations. Targets chosen with Nicolas.
Decision¶
Capacity & performance (GAP-08 — "small" tier):
- Engineer for ~100 users (~20 concurrent), tens of projects, on the order of 100k document versions, on a single-node deployment without architectural change — comfortably within single PostgreSQL + pgvector, confirming ADR-0005 (no clustering needed).
- Interactive operations p95 < 1s; full-text search < 1s; LLM-assisted (RAG) answers within a few seconds (bounded by the LLM provider).
Availability & recovery (GAP-09 — "standard business tool"):
- Availability target ~99.5% during business hours.
- Automated backup at least nightly (RPO ≤ 24h), stored separately from the primary system, retained per the data-protection/retention policy (ADR-0016).
- Restore to service within ~1 business day (RTO ≤ 1 business day).
- These can be tightened later (continuous/WAL archiving) without redesign.
Security (GAP-10):
- All transport over TLS; secure session cookies (REQ-AUTH-003).
- Encryption at rest is transparent / platform-level (disk/volume encryption, DB TDE, or S3 SSE), keys managed by the platform / secret manager. Per-scope application-level encryption (crypto-shredding) remains a documented future option (GAP-06), not adopted now.
- Secrets supplied via environment / secret manager, never in source or images.
- Dependencies (the SOUP list) scanned for known vulnerabilities in CI.
- Runtime connects as the RLS-subject role
lqms_app(non-owner, non-superuser, no BYPASSRLS) — least privilege (ADR-0009; closes RISK-002 at runtime). - Security-relevant events audited (REQ-AUD-001).
- Brute-force/credential-stuffing protection and MFA are the IdP's responsibility — LQMS stores no passwords (ADR-0011).
Consequences¶
- Single-node deployment is sufficient; revisit only if scale assumptions change to the "large" tier.
- CI gains dependency vulnerability scanning; the runtime datasource must be wired to
lqms_app(RISK-002) as part of the request-authorization work. - arc42 §10 quality scenarios are quantified from these targets and become CSV verification targets.
Requirements¶
Introduces STR-022 and the REQ-NFR group (pending requirements baseline v1.2).