Skip to main content

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)

ComponentServerSpecsMonthly Cost
Galata (Production)Hetzner CX438 vCPU, 16GB RAM, 160GB NVMe€12.80 (~$13.90)
Kadikoy (Worker/AI)Hetzner CX334 vCPU, 8GB RAM, 80GB NVMe€7.40 (~$8.03)
SnapshotsBoth serversWeekly automated~€1.72 ($1.87)
CloudflareCDN + R2Free 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
Kadikoy (Worker/AI):
  • 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

WorkloadBound ByImpact
AI discovery API callsNetwork (waiting for LLM response)Low CPU, high latency
AI batch classificationNetwork (25 companies per call)Low CPU, moderate latency
Web scraping (Perplexity/Google)Network (search API response)Low CPU, high latency
Python PDF/Excel parsingCPU (text extraction)High CPU, brief duration (max 60s)
Next.js SSRCPU (React rendering)Moderate CPU, scales with concurrent users
PostgreSQL queriesI/O (disk reads)Low CPU, depends on query complexity
Key insight: Most workloads are network-bound (waiting for AI APIs). CPU is rarely the bottleneck. This means CX (shared CPU) servers are appropriate even at moderate scale.

2. Simulation: 10 Users (Beta — Month 0-2)

User Behavior Profile

MetricValue
Total registered users10
Daily active users4-6
Concurrent users (peak)2-3
Discovery searches/day5-8
Contact reveals/day2-4
Page views/day100-200

Resource Consumption

ResourceUsageCapacityUtilization
Kadikoy CPU~5% avg, 15% peak4 vCPULow
Kadikoy RAM~2.5GB (Next.js + Node)8GB31%
Galata CPU~8% avg (Supabase + other sites)8 vCPULow
Galata RAM~10GB (Supabase + all services)16GB62%
Database size~500MB160GB<1%
API calls/day5-10 AI callsRate limit: 10/minMinimal
Bandwidth~2GB/day20TB/month<1%

Monthly Costs

ItemCostNotes
Infrastructure$23.80Fixed
AI API (240 searches/mo)$14.40240 × $0.06
AI API (90 reveals/mo)$2.7090 × $0.03
Total$40.90
Revenue$0Beta — free access
Net-$40.90Acceptable beta cost

Scaling Triggers: None

Everything comfortably within capacity. No action needed.

3. Simulation: 50 Users (Early Paid — Month 4-6)

User Behavior Profile

MetricValue
Total registered users50 (35 free, 12 Pro, 3 Team)
Daily active users15-25
Concurrent users (peak)5-8
Discovery searches/day30-50
Contact reveals/day20-40
Batch operations/week2-3 (Team users)
Page views/day500-1,000

Resource Consumption

ResourceUsageCapacityUtilization
Kadikoy CPU~12% avg, 35% peak4 vCPUComfortable
Kadikoy RAM~3.5GB8GB44%
Galata CPU~12% avg8 vCPULow
Galata RAM~11GB16GB69%
Database size~2GB160GB1.3%
API calls/day30-60 AI callsRate limit coversModerate
Bandwidth~8GB/day20TB/month1.2%

Monthly Costs

ItemCostNotes
Infrastructure$23.80Fixed
AI API (1,200 searches/mo)$72.001,200 × $0.06
AI API (900 reveals/mo)$27.00900 × $0.03
Stripe fees$22.00~15 transactions
Total costs$144.80
Revenue$1,15512 Pro × 59+3Team×59 + 3 Team × 149
Net profit+$1,01087.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

MetricValue
Total registered users200 (120 free, 65 Pro, 14 Team, 1 Enterprise)
Daily active users60-90
Concurrent users (peak)15-25
Discovery searches/day120-200
Contact reveals/day80-150
Batch operations/week8-12
Page views/day3,000-5,000

Resource Consumption

ResourceUsageCapacityUtilizationStatus
Kadikoy CPU~25% avg, 60% peak4 vCPUModerateWatch
Kadikoy RAM~5GB8GB62%Watch
Galata CPU~18% avg8 vCPULowOK
Galata RAM~12GB16GB75%Watch
Database size~8GB160GB5%OK
Database connections~30 activeDefault pool: 10030%OK
API calls/day120-250 AI callsRate limit: 600/hrModerateOK
Bandwidth~25GB/day20TB/month3.8%OK

Monthly Costs

ItemCostNotes
Infrastructure$23.80Fixed — still on original servers
AI API (4,800 searches/mo)$288.00Growing
AI API (3,450 reveals/mo)$103.50Growing
AI API (batch, 500 ops/mo)$15.00Team/Enterprise users
Stripe fees$190.00~80 transactions
Total costs$620.30
Revenue$5,78565 Pro + 14 Team + 1 Enterprise
Net profit+$5,16589.3% operating margin

Scaling Triggers

TriggerThresholdActionCost Impact
Kadikoy CPU avg >50%ApproachingRescale CX33 → CX43 (8 vCPU, 16GB)+€5.40/mo (+$5.86)
Galata RAM >80%ApproachingMonitor — Supabase is the heavy consumer
DB connections >60Not yetEnable PgBouncer connection pooling$0 (config change)
Rescale Kadikoy from CX33 to CX43 (~30/mototalinfrainsteadof30/mo total infra instead of 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

MetricValue
Total registered users1,000 (520 free, 350 Pro, 110 Team, 20 Enterprise)
Daily active users300-450
Concurrent users (peak)50-80
Discovery searches/day500-800
Contact reveals/day300-500
Batch operations/day50-100
Page views/day15,000-25,000

Resource Consumption

ResourceUsageCapacity (after upgrade)UtilizationStatus
Kadikoy CPU~45% avg, 85% peak8 vCPU (CX43)HighUpgrade needed
Kadikoy RAM~10GB16GB (CX43)62%OK
Galata CPU~30% avg8 vCPU (CX43)ModerateOK
Galata RAM~14GB16GB87%Upgrade needed
Database size~40GB160GB25%OK
Database connections~80-120 activePool: 100 (needs PgBouncer)HighConfigure
API calls/day600-1,200 AI callsRate limit: 1,200/hrModerateOK
Bandwidth~80GB/day20TB/month12%OK

Monthly Costs

ItemCostNotes
Infrastructure (upgraded)$60.00Galata CX53 + Kadikoy CX53 (see below)
AI API (20,000 searches/mo)$1,200.00Largest cost center
AI API (12,000 reveals/mo)$360.00
AI API (batch, 2,000 ops/mo)$60.00Enterprise + Team
AI API (deep analysis, 500/mo)$50.00Enterprise users
Stripe fees$1,100.00~480 transactions
Monitoring tools (PostHog, Sentry)$50.00May exceed free tiers
Total costs$2,880.00
Revenue$35,200350 Pro + 110 Team + 20 Enterprise
Net profit+$32,32091.8% operating margin

Required Infrastructure Upgrades

ServerCurrentUpgrade ToNew SpecsNew Cost
GalataCX43CX5316 vCPU, 32GB RAM, 320GB~€22/mo
KadikoyCX43CX5316 vCPU, 32GB RAM, 320GB~€22/mo
Total infra~€50/mo ($54)

Additional Infrastructure Needs at 1,000 Users

NeedSolutionCostPriority
Connection poolingPgBouncer (already in Supabase stack)$0High
CDN for static assetsCloudflare (already configured)$0Already done
Background job queueBullMQ + Redis on Kadikoy$0 (on existing server)High
Search result cachingRedis on Kadikoy$0 (on existing server)Medium
Monitoring upgradePostHog Cloud (050/mo)+Sentry(0-50/mo) + Sentry (0-26/mo)$0-76/moMedium
Backup verificationAutomated restore tests (monthly)$0 (script)High

6. Scaling Roadmap

Users    Infra Action                                    Monthly Infra Cost
──────   ────────────────────────────────────────────   ──────────────────
0-50     Original config (CX43 + CX33)                  $24
50-200   Rescale Kadikoy CX33 → CX43                    $30
200-500  Rescale Galata CX43 → CX53                     $44
500-1K   Rescale both to CX53, add PgBouncer + Redis     $54
1K-5K    Add VPS3 (dedicated worker), separate DB        $80-120
5K+      Consider managed DB or Supabase Cloud           $200+

         $200 ┤                                              ████
              │                                         ████ ████
         $120 ┤                                    ████ ████ ████
              │                               ████ ████ ████ ████
          $54 ┤                          ████ ████ ████ ████ ████
          $44 ┤                     ████ ████ ████ ████ ████ ████
          $30 ┤                ████ ████ ████ ████ ████ ████ ████
          $24 ┤  ████ ████ ████ ████ ████ ████ ████ ████ ████ ████
            0 ┤
              └──10───50──100──200──500──1K───2K───5K───10K──20K──
                                Users

7. AI Cost Simulation

Cost by Provider Strategy

StrategySearches/moCost/SearchMonthly AI CostNotes
All Gemini Flash20,000$0.03$600Cheapest but no web search
Gemini + Perplexity20,000$0.06$1,200Current strategy (balanced)
All Perplexity Sonar20,000$0.10$2,000Best search quality, most expensive
Self-hosted OSS20,000$0.01$200Future: GPU VPS (~$50/mo)

Cost Reduction Strategies

StrategySavingsImplementation
Search cache hit rate (30-day TTL)20-40%Already built (export_ai_search_history)
Smart provider routing30%Use Gemini for classification, Perplexity only for web search
Batch classification (25/call)80% vs individualAlready built (AI batch pipeline)
Result deduplication10-15%Skip companies already enriched recently
Off-peak processing0% (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

UsersSearches/moCache HitNet SearchesAI Cost/moAs % of Revenue
103005%285$17N/A (beta)
501,50015%1,275$776.7%
2006,00025%4,500$2704.7%
1,00030,00030%21,000$1,2603.6%
5,000150,00035%97,500$5,8502.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

UsersCompanies in DBContactsSearchesEst. DB Size% of 160GB
102,5005003,000500MB<1%
5012,0003,00015,0002GB1.3%
20050,00015,00060,0008GB5%
1,000250,00080,000300,00040GB25%
5,0001,000,000350,0001,500,000150GB94%

Scaling Actions

ThresholdAction
DB > 100GBUpgrade to CX53 (320GB disk) or add volume
DB > 250GBConsider dedicated DB server or Supabase Cloud
1M+ companiesImplement data archiving for stale records
10M+ search_historyAggregate and purge raw records older than 6 months

9. Concurrent User Simulation

Next.js SSR Performance

Concurrent UsersAvg Response TimeServer Load (Kadikoy CX43)Status
1-10<100ms<10% CPUExcellent
10-30100-200ms15-30% CPUGood
30-60200-400ms30-50% CPUAcceptable
60-100400-800ms50-70% CPUUpgrade soon
100+>800ms>70% CPUUpgrade required

API Route Performance (AI-Calling)

RouteAvg LatencyBottleneckConcurrency Limit
POST /api/discover8-15sLLM response time10 req/60s per user
POST /api/headhunt5-10sWeb search API10 req/60s per user
POST /api/ai/classify3-8sBatch LLM call10 req/60s per user
POST /api/ai/complete2-5sLLM response20 req/60s per user
GET /api/companies<200msPostgreSQL queryNo limit
GET /api/contacts<200msPostgreSQL queryNo 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?

ResourceLimitBreakpoint (Users)ActionCost to Fix
Kadikoy CPU4 vCPU sustained >60%~150-200Rescale to CX43+$6/mo
Kadikoy RAM8GB >80%~300-400Rescale to CX43 (16GB)Included above
Galata RAM16GB >85%~500-800Rescale to CX53 (32GB)+$13/mo
DB storage160GB >80%~4,000-5,000Upgrade disk or CX53+$13/mo
DB connections100 concurrent~500-700PgBouncer pooling$0
Bandwidth (20TB)>60% utilization~10,000+Unlikely to hit$0
Stripe free tierN/A (pay per txn)NeverAlways pay-per-use% of revenue
PostHog free tier1M events/month~2,000-3,000 usersUpgrade to $0-50 tier$0-50/mo

Infrastructure Cost vs Revenue at Each Breakpoint

Revenue/Costs

$35K ┤                                              ●  Revenue
     │                                         ●
$25K ┤                                    ●
     │                               ●
$15K ┤                          ●
     │                     ●
$10K ┤                ●
     │           ●
 $5K ┤      ●
     │  ●                                              ● Costs (incl. AI)
 $1K ┤● ─ ─ ● ─ ─ ● ─ ─ ● ─ ─ ● ─ ─ ● ─ ─ ● ─ ─ ● ─ ─ ●
   0 ┤
     └──10───50──100──200──500──1K───2K───3K───5K──
                        Users
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?

ScenarioImpactRecovery
Viral LinkedIn post → 500 signups in a daySSR slows to 2-3s, some 503sHetzner Rescale (15 min) — bump Kadikoy to CX53
Trade fair demo → 100 discovery searches in 1 hourRate limiter kicks in (10/min/user), queue formsTemporarily increase rate limit, AI APIs handle it
Bot attack → 10,000 requests/minCloudflare WAF blocks, rate limiter rejectsAlready protected at network + app level
Database corruptionWAL-PITR restores to any point in timeMax 5 min data loss (WAL shipping interval)
Hetzner datacenter outageFull downtimeNo HA — accept ~4h/year downtime for cost savings

Acceptable Downtime Target

TierSLAMonthly Downtime BudgetAppropriate At
Current99.5%3.6 hours0-1,000 users
Growth99.9%43 minutes1,000-10,000 users (add HA)
Scale99.95%22 minutes10,000+ users (multi-region)

12. Cost Summary — All Scales

ScaleUsersInfra/moAI/moStripe/moTotal Cost/moRevenue/moMargin
Beta10$24$17$0$41$0-100%
Early50$24$99$22$145$1,15587%
Growth200$30$407$190$627$5,78589%
Scale1,000$54$1,670$1,100$2,824$35,20092%
Big5,000$120$6,850$5,000$11,970$175,00093%
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

QuestionAnswer
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