- Add 5 standalone ADRs in infra/matrix/docs/adr/ - Add EXECUTION_ARCHITECTURE_KT.md: exact path from DNS decision to fleet ops - Architecture proof and continuity preserved
36 lines
930 B
Markdown
36 lines
930 B
Markdown
# ADR-005: Database Selection — SQLite for Phase 1
|
|
|
|
**Status**: Accepted
|
|
**Date**: 2026-04-05
|
|
**Deciders**: Ezra (architect), Timmy Foundation
|
|
**Scope**: Persistence layer for Conduit (#166, #183)
|
|
|
|
---
|
|
|
|
## Context
|
|
|
|
Conduit supports SQLite and PostgreSQL. Synapse requires Postgres.
|
|
|
|
## Decision
|
|
|
|
Use **SQLite** for the initial deployment (Phase 1). Migrate to PostgreSQL only if user count or performance metrics trigger it.
|
|
|
|
## Consequences
|
|
|
|
| Positive | Negative |
|
|
|----------|----------|
|
|
| Zero additional container/service | Harder to scale horizontally |
|
|
| Single file backup/restore | Performance ceiling under heavy load |
|
|
| Conduit optimized for SQLite | |
|
|
|
|
## Migration Trigger
|
|
|
|
- Concurrent active users > 50
|
|
- Database file > 10 GB
|
|
- Noticeable query latency on room sync
|
|
|
|
## References
|
|
|
|
- Issue: [#166](http://143.198.27.163:3000/Timmy_Foundation/timmy-config/issues/166)
|
|
- Config: `infra/matrix/conduit.toml`
|