Version. 0.1 Date. 2026-05-07 Purpose. Evaluate minimum hosting costs, scalability paths, and tier economics for Loomworks deployment.
| Component | What it is | Requirements | |-----------|-----------|-------------| | Engine | FastAPI/Python (loomworks-engine) | Persistent process (SSE requires long-lived connections). Background workers (trigger evaluator, polling loop). CPU for LLM prompt assembly. | | Operator Layer | Next.js (loomworks) | SSR/SSG. Can be served from edge or container. | | Engine database | PostgreSQL | The substrate. Events, persons, engagements, memory objects. ~1GB at alpha, grows with engagement count. | | Credit store | PostgreSQL (separate) | FORAY action flows, invitation codes, oracle rates. Small at alpha. | | File storage | Disk or object storage | Binary blobs from Phase 35 renders. PDFs, HTML, images. | | SSE connections | Persistent HTTP | One per authenticated client. Scales linearly with concurrent users. |
What you get: Git-push deploy. Managed PostgreSQL. Private networking. Auto-sleep for idle services.
| Service | Spec | Monthly cost | |---------|------|-------------| | Engine (FastAPI) | ~0.5 vCPU, 512MB RAM, always-on | ~$5–10 | | Operator Layer (Next.js) | ~0.25 vCPU, 256MB RAM | ~$3–5 | | Engine PostgreSQL | 256MB RAM, 1GB storage | ~$1–3 | | Credit store PostgreSQL | 256MB RAM, 1GB storage | ~$1–3 | | Total (alpha) | | ~$10–20/month |
Plan: Hobby at $5/month includes $5 credit. Realistic alpha spend: $15–25/month on Pro ($20/month includes $20 credit).
Scalability: Per-second billing scales smoothly. Add replicas when needed. No re-architecture required up to moderate traffic. Ceiling around $300–500/month before AWS becomes more cost-effective.
Pros: Zero DevOps. Git push to deploy. Managed databases. Private networking between services. Fastest path to production.
Cons: Limited regions (US, EU). No Ashburn/Miami region. Cold starts if services sleep. Less control than VPS.
What you get: Similar to Railway but fixed monthly pricing per service. Managed PostgreSQL. Auto-deploy from Git.
| Service | Spec | Monthly cost | |---------|------|-------------| | Engine (FastAPI) | Starter (512MB, 0.5 CPU) | $7 | | Operator Layer (Next.js) | Starter (512MB, 0.5 CPU) | $7 | | Engine PostgreSQL | Basic (256MB, 1GB) | $7 | | Credit store PostgreSQL | Basic (256MB, 1GB) | $7 | | Total (alpha) | | ~$28/month |
Plan: Free PostgreSQL is deleted after 30 days — not viable. Minimum production: $28/month for the four services.
Scalability: Fixed tier jumps ($7 → $25 → $85 per service). Less granular than Railway. Per-seat fees ($19/user) add up with team growth.
Pros: Predictable bills. No surprise spikes. Good developer experience.
Cons: More expensive at alpha than Railway. PostgreSQL doesn't include connection pooling. Per-seat fees for collaboration. Autoscaling only on Professional plan ($19/seat).
What you get: Raw VPS with exceptional price-performance. You manage everything: Docker, PostgreSQL, Nginx, SSL, backups.
| Service | Spec | Monthly cost | |---------|------|-------------| | Single VPS (all services) | CX23: 2 vCPU, 4GB RAM, 40GB NVMe, 20TB transfer | €4.15 (~$4.50) | | Or: CPX22 (better CPU) | 2 vCPU AMD, 4GB RAM, 80GB NVMe, 20TB transfer | €7.99 (~$8.70) | | Total (alpha) | | ~$5–9/month |
One VPS runs everything: engine, frontend, both PostgreSQL instances, Nginx reverse proxy. At alpha volumes (5–10 users), a 4GB RAM server handles the entire stack comfortably.
Scalability: Vertical scaling (upgrade to 8GB, 16GB) is trivial. Horizontal scaling requires architecture work (load balancer, separate database server). Good to ~50 concurrent users on a single 8GB box.
Pros: Cheapest by far. Full control. No vendor lock-in. European data residency (GDPR). 20TB transfer included. Best price-performance ratio in the market.
Cons: You are the DevOps team. PostgreSQL backups, SSL renewal, security patches, monitoring — all on you. No git-push deploy without setting up CI/CD. Hetzner's US region (Ashburn) is more expensive and has less included transfer.
What you get: Container deployment with edge distribution. Managed PostgreSQL via Supabase partnership.
| Service | Spec | Monthly cost | |---------|------|-------------| | Engine (FastAPI) | shared-cpu-1x, 256MB | ~$2–5 | | Operator Layer (Next.js) | shared-cpu-1x, 256MB | ~$2–5 | | PostgreSQL (via Supabase) | Free tier or $25/month | $0–25 | | Total (alpha) | | ~$5–35/month |
Scalability: Auto-scales to multiple regions. Good for global distribution. Machine-per-request model.
Pros: Global edge distribution. Good for SSE (persistent connections handled well). Scale-to-zero for low-traffic services.
Cons: Complexity. Fly.io's model requires understanding machine lifecycle. Database story is weaker than Railway/Render. Pricing less predictable.
What you get: Everything, at the cost of everything.
| Service | Spec | Monthly cost | |---------|------|-------------| | ECS Fargate (engine) | 0.25 vCPU, 512MB | ~$9 | | ECS Fargate (frontend) | 0.25 vCPU, 512MB | ~$9 | | RDS PostgreSQL (engine) | db.t4g.micro, 20GB | ~$15 | | RDS PostgreSQL (credit) | db.t4g.micro, 20GB | ~$15 | | ALB (load balancer) | | ~$16 | | S3 (file storage) | 10GB | ~$0.25 | | Total (alpha) | | ~$65–75/month |
Scalability: Unlimited. Auto-scaling groups, read replicas, multi-AZ, CloudFront CDN. This is the path if Loomworks grows to thousands of users.
Pros: Enterprise-grade. Everything AWS offers. Miami region (us-east-1). SOC 2, HIPAA-eligible.
Cons: Expensive at alpha. Complex. Requires AWS expertise. The ALB alone costs more than a full Hetzner VPS.
| Option | Alpha (5–10 users) | Beta (50–100 users) | Scale (1,000+ users) | |--------|-------------------|--------------------|--------------------| | Railway | $15–25/month | $50–100/month | $200–500/month | | Render | $28/month | $80–150/month | $300–600/month | | Hetzner VPS | $5–9/month | $15–30/month (larger VPS) | Needs re-architecture | | Fly.io | $5–35/month | $50–100/month | $200–400/month | | AWS | $65–75/month | $100–200/month | $300–1,000/month |
Alpha (now): Hetzner or Railway.
Hetzner is the cheapest path — $5/month runs the entire stack. But you're the DevOps team. If you want to focus on product and not infrastructure, Railway at $15–25/month buys you git-push deploy, managed databases, and zero maintenance overhead. The $10–20/month premium over Hetzner buys real time savings.
Beta (invited users): Railway Pro or Hetzner + Coolify.
Railway Pro at $20/month scales gracefully. If staying on Hetzner, add Coolify (open-source PaaS on your VPS) for git-push deploys and managed SSL — keeps costs at $10–15/month with a much better developer experience than raw Docker.
Scale (open launch): AWS or Railway → AWS migration.
When concurrent user count makes SSE connection management and database performance matter, AWS is the endgame. The migration from Railway to AWS is Docker-based — same containers, different orchestration.
The minimum viable hosting cost is ~$5–25/month depending on path. This is DUNIN7's infrastructure cost per month, regardless of user count (at alpha scale).
What each tier needs to cover:
| Tier | License revenue | DUNIN7 hosting cost share | LLM cost | Margin | |------|---------------|------------------------|----------|--------| | Trial (free) | $0 | Subsidized from license revenue | System key (DUNIN7 pays) | Negative — acquisition cost | | Maker ($0) | $0 | ~$0.50/user/month (marginal infra) | User's own key | Negative — infrastructure subsidy | | Professional ($29) | $29/month | ~$1–2/user/month | User's own key | ~$27/month gross | | Team ($19/seat) | $57+/month (3 seat min) | ~$3–5/team/month | User's own key | ~$52+/month gross |
At 100 Professional users: $2,900/month revenue vs. ~$200–500/month hosting = strong margins. The LLM cost is entirely on the user (BYOK) except for trial users consuming the system key.
Break-even on infrastructure: ~2 Professional subscribers cover the hosting cost at any provider. The trial credit pool is the cost center — funded from license revenue.
The SSE bottleneck. Each concurrent authenticated user holds an SSE connection. A single FastAPI process can handle ~1,000 concurrent SSE connections before event loop pressure matters. At 100 concurrent users, a single process is fine. At 1,000+, you need multiple engine instances behind a load balancer with sticky sessions or a Redis pub/sub layer for SSE event distribution.
The database bottleneck. PostgreSQL handles the Loomworks workload easily at alpha. The first real pressure point is the FORAY action flows query for credit balance derivation — a SUM over all flows for a person. At high transaction volume, this needs an index or a materialized view. Not a concern until thousands of consumption events per person.
The file storage question. Binary blobs on local disk works on a single VPS. Multi-server deployment needs object storage (S3, Hetzner Object Storage, Cloudflare R2). R2 is the cheapest for egress — no egress fees.
DUNIN7 — Done In Seven LLC — Miami, Florida Hosting cost analysis — v0.1 — 2026-05-07