WHATS CRM HUB

Architecture & Scale

One System, Five Tiers

The Same System That Serves Your First 5 Customers Will Serve Your Next 5,000

You do not have to rewrite anything as the business grows. Just move to a bigger server or split components. The hooks are already in the code.

One of the most frequent questions from prospective reseller partners: "if I start small and my customers grow into the thousands, will the system hold up?". Answer: yes, without a rewrite. This page shows the path from Tier 1 (4GB Contabo VPS at $13/month) up to Tier 5 (multi-region Kubernetes).

All numbers below come from real internal load testing on the code (see docs/system/LOAD_TEST.md, 1,281 lines) โ€” not marketing estimates. Server prices are 2026 public prices (Hetzner Cloud, Contabo, DigitalOcean, AWS Singapore).

How to Estimate Your Needs

A Simple Formula for RAM & Disk

Before picking a tier, estimate your needs with this rule of thumb.
~2 MB
RAM per WhatsApp Web device

1 customer typically uses 1-3 WhatsApp devices. So 100 customers โ‰ˆ 100-300 devices โ‰ˆ 200-600 MB RAM just for whatsmeow sessions.

~1 KB
Disk per stored message

1 customer sends/receives 50-200 messages/day on average. 100 customers ร— 100 msg ร— 365 days โ‰ˆ 3.6 GB/year (archivable).

~80 KB
RAM per active WebSocket connection

1 customer typically opens 1-3 dashboard tabs. 100 customers โ‰ˆ 200 active WS connections โ‰ˆ 16 MB RAM.

~150 bytes
Memory per pending broadcast task

A 100k-message broadcast โ‰ˆ 15 MB Asynq queue payload. Comfortably fits Tier 2 (6-8 GB RAM).

Rule of thumb: 1 active customer โ‰ˆ 5-10 MB RAM (whatsmeow + WS + buffer). 100 customers = ~500 MB-1 GB RAM for customer-state. The rest is OS, Postgres, Redis, and headroom.

Scaling Journey โ€” 5 Tiers

Start Cheap, Level Up as Your Business Grows

No vendor lock-in. No rewrite. Just move servers or add components.
๐ŸŒฑ
Tier 1

Start (Month 1โ€“3)

Pilot, demo, pre-revenue
1โ€“10 customers
Up to 10k messages/day
Cost
$13โ€“$25/month
Spec
1 VPS: 2 vCPU ร— 4 GB ร— 50 GB SSD
Providers
Contabo VPS S, Hetzner CX22, DigitalOcean Basic
Cocok untuk
Resellers just getting started, agencies testing the market, internal staging.
Highlights
  • All components co-located (App + Worker + Postgres + Redis on 1 server)
  • 4GB is enough because traffic is low and the queue is empty
  • Initial outlay under $30 โ€” minimal business risk
๐ŸŒฟ
Tier 2

Grow (Month 3โ€“12)

First paying customers, capital recovered
10โ€“100 customers
Up to 100k messages/day
Cost
$40โ€“$75/month
Spec
1 VPS: 4 vCPU ร— 8 GB ร— 100 GB NVMe
Providers
Contabo VPS M, Hetzner CX32, DigitalOcean Premium
Cocok untuk
The sweet spot for 80% of SMB resellers. Capital should already be returned by month 2-3 (10 customers ร— $15 = $150 revenue).
Highlights
  • Just bump DB_MAX_OPEN_CONNS=60, Asynq concurrency stays at 50
  • Postgres tuning: shared_buffers=2GB
  • Safe for 50k-detail broadcast campaigns
  • Daily auto-backup โ€” about $5 extra for snapshots
๐ŸŒณ
Tier 3

Expand (Year 1โ€“2)

Stable cash flow, ready to scale up
100โ€“500 customers
Up to 500k messages/day
Cost
$190โ€“$310/month total
Spec
4 servers: App (4ร—8GB) + Worker (4ร—8GB) + Postgres (4ร—16GBร—200GB) + Redis (2ร—4GB)
Providers
Hetzner Cloud (Helsinki/Singapore), AWS Lightsail, DigitalOcean
Cocok untuk
Large resellers with many sub-tenants, or mid-market enterprise with internal multi-division use.
Highlights
  • Postgres on its own server (shared_buffers=4GB)
  • Dedicated Redis (queue + throttle + pubsub)
  • Ops-only setup โ€” no code changes
  • Optional Postgres replica for read-heavy workloads
๐Ÿข
Tier 4

Scale (Year 2+)

Enterprise tier, needs HA + SRE
500โ€“2,000 customers
Up to 1 million messages/day
Cost
$750โ€“$1,250/month total
Spec
9 servers: Appร—2 (LB) + Workerร—2 (sharded) + Postgres primary (8ร—32GB) + replica + Redisร—2 + monitoring + PgBouncer
Providers
Hetzner Cloud, AWS Singapore, GCP
Cocok untuk
Big agencies, resellers with thousands of sub-tenants, corporate brands with operations teams.
Highlights
  • Stateless API behind Load Balancer โ€” high availability
  • Worker sharded by business_id hash range
  • Postgres primary + replica (read-heavy goes to replica)
  • Full monitoring stack: Prometheus + Grafana + Loki
  • Requires at least 1 SRE/devops for ongoing capacity planning
๐Ÿ›๏ธ
Tier 5

Enterprise / Multi-Region

Global customers, data residency regulations
2,000+ customers
5 million+ messages/day
Cost
$5,000โ€“$15,000/month depending on cloud + region
Spec
Kubernetes (10โ€“30 auto-scaling pods) + managed Postgres + managed Redis + CDN + multi-region
Providers
AWS / GCP / Azure (multi-region: Singapore, Saudi Arabia, Sรฃo Paulo), Supabase Pro, Upstash
Cocok untuk
Global brands, strict compliance (Saudi PDPL data residency, Brazil LGPD), white-label SaaS at SEA + Middle East scale.
Highlights
  • Managed Postgres (RDS / Neon / Supabase) โ€” auto-failover, point-in-time recovery
  • Redis cluster mode (Elasticache / Upstash)
  • Region-pinning per tenant (Saudi PDPL compliance)
  • CDN for static assets (CloudFront, Cloudflare)

Note: pricing above excludes bandwidth (typically 5โ€“20 TB free at Hetzner/Contabo) and external backup storage.

What the System Handles Automatically

You Do Not Need to Be Smart โ€” The System Is

Several classic risks at scale (queue runaway, throttle violations, memory leaks) are handled automatically.
Queue Backpressure (Max 50,000)

When the broadcast queue is full, the system rejects new pickups โ€” no crash, no OOM. Customers get clear error messages.

Per-Phone Token Bucket (Anti Meta 429)

250 RPS per phone, automatic. You do not need to worry about hitting the Meta Graph API rate limit.

Heartbeat Lock (Anti Throttle Violation)

When a heartbeat lock is lost (another instance takes over), the batch is automatically aborted โ€” no double-send to the same device that could trigger a WhatsApp ban.

30s Statement Timeout

Long queries are auto-cancelled โ€” no goroutine blocks indefinitely even with a bad query.

Graceful Shutdown

On redeploy, the system drains requests + closes WS connections with a 1-second per-client timeout. No data corruption from force-kill.

Exponential Retry (Asynq)

Task failed? Auto-retry with smart backoff. You only see tasks that truly cannot be completed.

Growth = Config, Not Rewrite

Level Up Without Touching Code

Here is what changes when you move tier โ€” all at the config/ops level, not source code.
DB Connection Pool

Tier 1: DB_MAX_OPEN_CONNS=25. Tier 4: =120. Just change the env variable, restart.

Worker Concurrency

Tier 1: concurrency=20. Tier 4: =200 per worker ร— 2 worker shards. Env variable only.

Worker Sharding

Tier 4 starts using WORKER_SHARD_RANGE=0-50% and =50-100% on 2 instances โ€” automatic business_id hash-range split.

Redis Split

Tier 4: queue, throttle, and pubsub can use 2 separate Redis instances via REDIS_QUEUE_URL + REDIS_CACHE_URL โ€” already ready.

Postgres Read Replica

Tier 4: read-heavy queries can be routed to the replica via db.Pool.Read() โ€” scaffolding is ready, opt-in per repository as needed.

Health Check & Cache Invalidate

The /health endpoint checks DB + Redis. Cross-instance cache invalidation via Redis pub-sub โ€” already running for multi-replica deploys.

Not Sure Which Tier You Need?

Talk to our team for 30 minutes โ€” we will help size your setup based on target customer count, estimated message volume, and infra budget.