ADR 002: Dedicated DB VPS instead of single VPS
Source:
g2labs-in/linode-infra@4812f10·docs/adr/002-dedicated-db-vps.md· updated 2026-05-26
Date: 2026-05-25 Status: accepted
Context
After deciding to self-host PostgreSQL, we faced the question: run it on the existing dokploy-prod VPS (4GB RAM) or provision a dedicated VPS? The existing VPS already runs Dokploy UI, Traefik, the Billuu backend (Node.js), and Redis.
Decision
Provision a separate g6-standard-1 (2GB RAM, $12/mo) VPS dedicated to PostgreSQL. Keep the existing VPS running application services unchanged.
Alternatives considered
| Option | Pros | Cons | Rejected because |
|---|---|---|---|
| Everything on 1 VPS | Saves $12/mo | No fault isolation, Postgres competes for RAM with Node.js, no resilience | Single point of failure unacceptable even for early stage |
| Dedicated DB VPS | Fault isolation, Postgres gets dedicated RAM/I/O, easier scaling | $12/mo extra | Chosen |
| Dokploy on separate management VPS + app+db on one | Better isolation | Requires migrating Dokploy (complex, would break GitHub/Tailscale config) | Too disruptive |
Consequences
- Positive: If app VPS crashes, database is safe. If DB VPS crashes, app can be reconfigured to fall back to Supabase. PostgreSQL has dedicated resources.
- Negative: $12/mo added cost, slightly more complex to manage
- Neutral: Inter-VPS communication uses Tailscale (private, encrypted, zero-config)