Cernio — Production Simulation
Version: 1.0 Date: 2026-03-25 Source: Hetzner VPS Plan, Strategy Docs (02, 04), Handbook (Ch. 189-210) Purpose: Simulate infrastructure, AI costs, and operational load at 10, 50, 200, and 1,000 users
1. Infrastructure Baseline
Current Architecture (Post-Migration to Hetzner)
| Component | Server | Specs | Monthly Cost |
|---|---|---|---|
| Galata (Production) | Hetzner CX43 | 8 vCPU, 16GB RAM, 160GB NVMe | €12.80 (~$13.90) |
| Kadikoy (Worker/AI) | Hetzner CX33 | 4 vCPU, 8GB RAM, 80GB NVMe | €7.40 (~$8.03) |
| Snapshots | Both servers | Weekly automated | ~€1.72 ($1.87) |
| Cloudflare | CDN + R2 | Free tier | $0 |
| Total infrastructure | ~$23.80/mo |
Prices reflect Hetzner post-April 2026 increase (+30-37%).
What Runs Where
Galata (Production):- Supabase (PostgreSQL + GoTrue Auth + PostgREST + Kong Gateway)
- dose.com.tr (corporate site)
- admin.dose.com.tr (admin panel)
- Coolify orchestrator + Traefik
- WireGuard VPN, Uptime Kuma, Vaultwarden
- Cernio Next.js application (SSR)
- Python scraper
- 16 API routes (including AI-calling routes)
- Batch scripts (finder, cleaner, bulk_fixer)
Scaling Decision: CPU vs Network Bound
| Workload | Bound By | Impact |
|---|---|---|
| AI discovery API calls | Network (waiting for LLM response) | Low CPU, high latency |
| AI batch classification | Network (25 companies per call) | Low CPU, moderate latency |
| Web scraping (Perplexity/Google) | Network (search API response) | Low CPU, high latency |
| Python PDF/Excel parsing | CPU (text extraction) | High CPU, brief duration (max 60s) |
| Next.js SSR | CPU (React rendering) | Moderate CPU, scales with concurrent users |
| PostgreSQL queries | I/O (disk reads) | Low CPU, depends on query complexity |
2. Simulation: 10 Users (Beta — Month 0-2)
User Behavior Profile
| Metric | Value |
|---|---|
| Total registered users | 10 |
| Daily active users | 4-6 |
| Concurrent users (peak) | 2-3 |
| Discovery searches/day | 5-8 |
| Contact reveals/day | 2-4 |
| Page views/day | 100-200 |
Resource Consumption
| Resource | Usage | Capacity | Utilization |
|---|---|---|---|
| Kadikoy CPU | ~5% avg, 15% peak | 4 vCPU | Low |
| Kadikoy RAM | ~2.5GB (Next.js + Node) | 8GB | 31% |
| Galata CPU | ~8% avg (Supabase + other sites) | 8 vCPU | Low |
| Galata RAM | ~10GB (Supabase + all services) | 16GB | 62% |
| Database size | ~500MB | 160GB | <1% |
| API calls/day | 5-10 AI calls | Rate limit: 10/min | Minimal |
| Bandwidth | ~2GB/day | 20TB/month | <1% |
Monthly Costs
| Item | Cost | Notes |
|---|---|---|
| Infrastructure | $23.80 | Fixed |
| AI API (240 searches/mo) | $14.40 | 240 × $0.06 |
| AI API (90 reveals/mo) | $2.70 | 90 × $0.03 |
| Total | $40.90 | |
| Revenue | $0 | Beta — free access |
| Net | -$40.90 | Acceptable beta cost |
Scaling Triggers: None
Everything comfortably within capacity. No action needed.3. Simulation: 50 Users (Early Paid — Month 4-6)
User Behavior Profile
| Metric | Value |
|---|---|
| Total registered users | 50 (35 free, 12 Pro, 3 Team) |
| Daily active users | 15-25 |
| Concurrent users (peak) | 5-8 |
| Discovery searches/day | 30-50 |
| Contact reveals/day | 20-40 |
| Batch operations/week | 2-3 (Team users) |
| Page views/day | 500-1,000 |
Resource Consumption
| Resource | Usage | Capacity | Utilization |
|---|---|---|---|
| Kadikoy CPU | ~12% avg, 35% peak | 4 vCPU | Comfortable |
| Kadikoy RAM | ~3.5GB | 8GB | 44% |
| Galata CPU | ~12% avg | 8 vCPU | Low |
| Galata RAM | ~11GB | 16GB | 69% |
| Database size | ~2GB | 160GB | 1.3% |
| API calls/day | 30-60 AI calls | Rate limit covers | Moderate |
| Bandwidth | ~8GB/day | 20TB/month | 1.2% |
Monthly Costs
| Item | Cost | Notes |
|---|---|---|
| Infrastructure | $23.80 | Fixed |
| AI API (1,200 searches/mo) | $72.00 | 1,200 × $0.06 |
| AI API (900 reveals/mo) | $27.00 | 900 × $0.03 |
| Stripe fees | $22.00 | ~15 transactions |
| Total costs | $144.80 | |
| Revenue | $1,155 | 12 Pro × 149 |
| Net profit | +$1,010 | 87.5% operating margin |
Scaling Triggers: None Yet
All resources below 50% utilization on average. Database well within capacity. No upgrade needed.4. Simulation: 200 Users (Growth — Month 9-12)
User Behavior Profile
| Metric | Value |
|---|---|
| Total registered users | 200 (120 free, 65 Pro, 14 Team, 1 Enterprise) |
| Daily active users | 60-90 |
| Concurrent users (peak) | 15-25 |
| Discovery searches/day | 120-200 |
| Contact reveals/day | 80-150 |
| Batch operations/week | 8-12 |
| Page views/day | 3,000-5,000 |
Resource Consumption
| Resource | Usage | Capacity | Utilization | Status |
|---|---|---|---|---|
| Kadikoy CPU | ~25% avg, 60% peak | 4 vCPU | Moderate | Watch |
| Kadikoy RAM | ~5GB | 8GB | 62% | Watch |
| Galata CPU | ~18% avg | 8 vCPU | Low | OK |
| Galata RAM | ~12GB | 16GB | 75% | Watch |
| Database size | ~8GB | 160GB | 5% | OK |
| Database connections | ~30 active | Default pool: 100 | 30% | OK |
| API calls/day | 120-250 AI calls | Rate limit: 600/hr | Moderate | OK |
| Bandwidth | ~25GB/day | 20TB/month | 3.8% | OK |
Monthly Costs
| Item | Cost | Notes |
|---|---|---|
| Infrastructure | $23.80 | Fixed — still on original servers |
| AI API (4,800 searches/mo) | $288.00 | Growing |
| AI API (3,450 reveals/mo) | $103.50 | Growing |
| AI API (batch, 500 ops/mo) | $15.00 | Team/Enterprise users |
| Stripe fees | $190.00 | ~80 transactions |
| Total costs | $620.30 | |
| Revenue | $5,785 | 65 Pro + 14 Team + 1 Enterprise |
| Net profit | +$5,165 | 89.3% operating margin |
Scaling Triggers
| Trigger | Threshold | Action | Cost Impact |
|---|---|---|---|
| Kadikoy CPU avg >50% | Approaching | Rescale CX33 → CX43 (8 vCPU, 16GB) | +€5.40/mo (+$5.86) |
| Galata RAM >80% | Approaching | Monitor — Supabase is the heavy consumer | — |
| DB connections >60 | Not yet | Enable PgBouncer connection pooling | $0 (config change) |
Recommended Action at 200 Users
Rescale Kadikoy from CX33 to CX43 (~24/mo). This is a Hetzner “Rescale” operation — one-click, zero-downtime (virtual hardware upgrade).5. Simulation: 1,000 Users (Scale — Month 24-36)
User Behavior Profile
| Metric | Value |
|---|---|
| Total registered users | 1,000 (520 free, 350 Pro, 110 Team, 20 Enterprise) |
| Daily active users | 300-450 |
| Concurrent users (peak) | 50-80 |
| Discovery searches/day | 500-800 |
| Contact reveals/day | 300-500 |
| Batch operations/day | 50-100 |
| Page views/day | 15,000-25,000 |
Resource Consumption
| Resource | Usage | Capacity (after upgrade) | Utilization | Status |
|---|---|---|---|---|
| Kadikoy CPU | ~45% avg, 85% peak | 8 vCPU (CX43) | High | Upgrade needed |
| Kadikoy RAM | ~10GB | 16GB (CX43) | 62% | OK |
| Galata CPU | ~30% avg | 8 vCPU (CX43) | Moderate | OK |
| Galata RAM | ~14GB | 16GB | 87% | Upgrade needed |
| Database size | ~40GB | 160GB | 25% | OK |
| Database connections | ~80-120 active | Pool: 100 (needs PgBouncer) | High | Configure |
| API calls/day | 600-1,200 AI calls | Rate limit: 1,200/hr | Moderate | OK |
| Bandwidth | ~80GB/day | 20TB/month | 12% | OK |
Monthly Costs
| Item | Cost | Notes |
|---|---|---|
| Infrastructure (upgraded) | $60.00 | Galata CX53 + Kadikoy CX53 (see below) |
| AI API (20,000 searches/mo) | $1,200.00 | Largest cost center |
| AI API (12,000 reveals/mo) | $360.00 | |
| AI API (batch, 2,000 ops/mo) | $60.00 | Enterprise + Team |
| AI API (deep analysis, 500/mo) | $50.00 | Enterprise users |
| Stripe fees | $1,100.00 | ~480 transactions |
| Monitoring tools (PostHog, Sentry) | $50.00 | May exceed free tiers |
| Total costs | $2,880.00 | |
| Revenue | $35,200 | 350 Pro + 110 Team + 20 Enterprise |
| Net profit | +$32,320 | 91.8% operating margin |
Required Infrastructure Upgrades
| Server | Current | Upgrade To | New Specs | New Cost |
|---|---|---|---|---|
| Galata | CX43 | CX53 | 16 vCPU, 32GB RAM, 320GB | ~€22/mo |
| Kadikoy | CX43 | CX53 | 16 vCPU, 32GB RAM, 320GB | ~€22/mo |
| Total infra | ~€50/mo ($54) |
Additional Infrastructure Needs at 1,000 Users
| Need | Solution | Cost | Priority |
|---|---|---|---|
| Connection pooling | PgBouncer (already in Supabase stack) | $0 | High |
| CDN for static assets | Cloudflare (already configured) | $0 | Already done |
| Background job queue | BullMQ + Redis on Kadikoy | $0 (on existing server) | High |
| Search result caching | Redis on Kadikoy | $0 (on existing server) | Medium |
| Monitoring upgrade | PostHog Cloud (0-26/mo) | $0-76/mo | Medium |
| Backup verification | Automated restore tests (monthly) | $0 (script) | High |
6. Scaling Roadmap
7. AI Cost Simulation
Cost by Provider Strategy
| Strategy | Searches/mo | Cost/Search | Monthly AI Cost | Notes |
|---|---|---|---|---|
| All Gemini Flash | 20,000 | $0.03 | $600 | Cheapest but no web search |
| Gemini + Perplexity | 20,000 | $0.06 | $1,200 | Current strategy (balanced) |
| All Perplexity Sonar | 20,000 | $0.10 | $2,000 | Best search quality, most expensive |
| Self-hosted OSS | 20,000 | $0.01 | $200 | Future: GPU VPS (~$50/mo) |
Cost Reduction Strategies
| Strategy | Savings | Implementation |
|---|---|---|
| Search cache hit rate (30-day TTL) | 20-40% | Already built (export_ai_search_history) |
| Smart provider routing | 30% | Use Gemini for classification, Perplexity only for web search |
| Batch classification (25/call) | 80% vs individual | Already built (AI batch pipeline) |
| Result deduplication | 10-15% | Skip companies already enriched recently |
| Off-peak processing | 0% (no time pricing) | N/A for API-based |
| Self-hosted models (future) | 60-80% | Requires GPU VPS ($50-100/mo) at 5K+ users |
Projected AI Cost at Scale
| Users | Searches/mo | Cache Hit | Net Searches | AI Cost/mo | As % of Revenue |
|---|---|---|---|---|---|
| 10 | 300 | 5% | 285 | $17 | N/A (beta) |
| 50 | 1,500 | 15% | 1,275 | $77 | 6.7% |
| 200 | 6,000 | 25% | 4,500 | $270 | 4.7% |
| 1,000 | 30,000 | 30% | 21,000 | $1,260 | 3.6% |
| 5,000 | 150,000 | 35% | 97,500 | $5,850 | 2.8% |
AI cost as % of revenue decreases at scale because subscription revenue scales linearly while AI cost benefits from caching and batch efficiencies.
8. Database Growth Simulation
Storage Projection
| Users | Companies in DB | Contacts | Searches | Est. DB Size | % of 160GB |
|---|---|---|---|---|---|
| 10 | 2,500 | 500 | 3,000 | 500MB | <1% |
| 50 | 12,000 | 3,000 | 15,000 | 2GB | 1.3% |
| 200 | 50,000 | 15,000 | 60,000 | 8GB | 5% |
| 1,000 | 250,000 | 80,000 | 300,000 | 40GB | 25% |
| 5,000 | 1,000,000 | 350,000 | 1,500,000 | 150GB | 94% |
Scaling Actions
| Threshold | Action |
|---|---|
| DB > 100GB | Upgrade to CX53 (320GB disk) or add volume |
| DB > 250GB | Consider dedicated DB server or Supabase Cloud |
| 1M+ companies | Implement data archiving for stale records |
| 10M+ search_history | Aggregate and purge raw records older than 6 months |
9. Concurrent User Simulation
Next.js SSR Performance
| Concurrent Users | Avg Response Time | Server Load (Kadikoy CX43) | Status |
|---|---|---|---|
| 1-10 | <100ms | <10% CPU | Excellent |
| 10-30 | 100-200ms | 15-30% CPU | Good |
| 30-60 | 200-400ms | 30-50% CPU | Acceptable |
| 60-100 | 400-800ms | 50-70% CPU | Upgrade soon |
| 100+ | >800ms | >70% CPU | Upgrade required |
API Route Performance (AI-Calling)
| Route | Avg Latency | Bottleneck | Concurrency Limit |
|---|---|---|---|
POST /api/discover | 8-15s | LLM response time | 10 req/60s per user |
POST /api/headhunt | 5-10s | Web search API | 10 req/60s per user |
POST /api/ai/classify | 3-8s | Batch LLM call | 10 req/60s per user |
POST /api/ai/complete | 2-5s | LLM response | 20 req/60s per user |
GET /api/companies | <200ms | PostgreSQL query | No limit |
GET /api/contacts | <200ms | PostgreSQL query | No limit |
AI routes are latency-bound by external APIs (8-15s), not server resources. Even at 1,000 users, only 50-80 are concurrent, and only a fraction are running AI queries simultaneously. The rate limiter prevents abuse.
10. Breakpoint Analysis
When Does Each Resource Hit Its Limit?
| Resource | Limit | Breakpoint (Users) | Action | Cost to Fix |
|---|---|---|---|---|
| Kadikoy CPU | 4 vCPU sustained >60% | ~150-200 | Rescale to CX43 | +$6/mo |
| Kadikoy RAM | 8GB >80% | ~300-400 | Rescale to CX43 (16GB) | Included above |
| Galata RAM | 16GB >85% | ~500-800 | Rescale to CX53 (32GB) | +$13/mo |
| DB storage | 160GB >80% | ~4,000-5,000 | Upgrade disk or CX53 | +$13/mo |
| DB connections | 100 concurrent | ~500-700 | PgBouncer pooling | $0 |
| Bandwidth (20TB) | >60% utilization | ~10,000+ | Unlikely to hit | $0 |
| Stripe free tier | N/A (pay per txn) | Never | Always pay-per-use | % of revenue |
| PostHog free tier | 1M events/month | ~2,000-3,000 users | Upgrade to $0-50 tier | $0-50/mo |
Infrastructure Cost vs Revenue at Each Breakpoint
Revenue grows much faster than costs at every scale. The gap widens because fixed costs are minimal and AI costs benefit from caching.
11. Disaster Scenarios
What If Traffic Spikes 10x Overnight?
| Scenario | Impact | Recovery |
|---|---|---|
| Viral LinkedIn post → 500 signups in a day | SSR slows to 2-3s, some 503s | Hetzner Rescale (15 min) — bump Kadikoy to CX53 |
| Trade fair demo → 100 discovery searches in 1 hour | Rate limiter kicks in (10/min/user), queue forms | Temporarily increase rate limit, AI APIs handle it |
| Bot attack → 10,000 requests/min | Cloudflare WAF blocks, rate limiter rejects | Already protected at network + app level |
| Database corruption | WAL-PITR restores to any point in time | Max 5 min data loss (WAL shipping interval) |
| Hetzner datacenter outage | Full downtime | No HA — accept ~4h/year downtime for cost savings |
Acceptable Downtime Target
| Tier | SLA | Monthly Downtime Budget | Appropriate At |
|---|---|---|---|
| Current | 99.5% | 3.6 hours | 0-1,000 users |
| Growth | 99.9% | 43 minutes | 1,000-10,000 users (add HA) |
| Scale | 99.95% | 22 minutes | 10,000+ users (multi-region) |
12. Cost Summary — All Scales
| Scale | Users | Infra/mo | AI/mo | Stripe/mo | Total Cost/mo | Revenue/mo | Margin |
|---|---|---|---|---|---|---|---|
| Beta | 10 | $24 | $17 | $0 | $41 | $0 | -100% |
| Early | 50 | $24 | $99 | $22 | $145 | $1,155 | 87% |
| Growth | 200 | $30 | $407 | $190 | $627 | $5,785 | 89% |
| Scale | 1,000 | $54 | $1,670 | $1,100 | $2,824 | $35,200 | 92% |
| Big | 5,000 | $120 | $6,850 | $5,000 | $11,970 | $175,000 | 93% |
Operating margin improves with scale. This is the hallmark of a well-architected SaaS: fixed costs become negligible, AI costs benefit from caching, and revenue scales linearly with users.
Summary
| Question | Answer |
|---|---|
| Can current infra handle 200 users? | Yes — one Kadikoy upgrade (~$6/mo more) |
| When is the first real upgrade needed? | ~200 users (Kadikoy rescale) |
| What’s the biggest cost at scale? | AI API calls (~48% of costs at 1K users) |
| Is the cost model sustainable? | Yes — margin improves from 87% to 93% at scale |
| When might we need a 3rd server? | ~2,000-5,000 users (dedicated worker VPS) |
| Can we handle a viral spike? | Yes — Hetzner Rescale (15 min) + rate limiting |
Next: INDEX.md — Document index and PM Knowledge Base guide