The Serverless Tax: Why We Run Client Workloads on Boring VPS and Docker
Tech industry sold founders lie: serverless cures operational overhead. Narrative promised zero server management, automatic infinite scaling, billing down to exact millisecond.
Startups bought story. Result: fragile architectures, bloated cloud bills, vendor lock-in, poor performance.
At Kreasi Kita, engineering team rejects this trend. Modern serverless architecture evolved into tax on developer laziness and architectural ignorance.
Team runs production client workloads on boring, predictable infrastructure: standard Virtual Private Servers (VPS), Linux primitives, Docker containers.
Single ten-dollar VPS running Docker, PostgreSQL, lightweight reverse proxy handles millions of requests monthly. Zero cold starts. Negligible latency. Predictable cost. Total operational control.
+---------------------------------------------------------------+
| CLIENT ARCHITECTURE |
+---------------------------------------------------------------+
| |
| [ Modern Serverless Stack ] |
| Client Browser -> Vercel Edge -> AWS Lambda -> RDS Proxy |
| -> Aurora Serverless -> Datadog |
| * High latency (cold starts) |
| * Exploding costs ($500 - $3,000/mo) |
| * Complete vendor lock-in |
| |
| vs |
| |
| [ Boring Kreasi Kita Stack ] |
| Client Browser -> Caddy (Auto TLS) -> Docker App Container |
| -> Local PostgreSQL (Persistent Pool) |
| * Constant p99 latency (<15ms) |
| * Fixed cost ($10 - $40/mo) |
| * 100% portable OCI containers |
| |
+---------------------------------------------------------------+
Fallacy of "Zero Ops"
Serverless vendors claim servers dead. Claim false. Servers still exist; developers give up control, pay 10x premium for third party to manage them poorly.
Teams adopt AWS Lambda, Google Cloud Run, Vercel edge functions hoping to eliminate DevOps hires. Instead, engineering hours shift toward configuration hell:
- Writing dense AWS IAM policies with hundreds of lines of fragile JSON.
- Debugging ephemeral container lifecycles across distributed tracing vendors.
- Managing API Gateway timeout limits, payload constraints, fragmented logs.
- Wrestling CloudFormation, SAM, Serverless Framework manifests.
DevOps workload did not disappear. It transformed into proprietary platform engineering. Debugging production bug no longer means inspecting standard Linux socket or checking docker logs. Now requires decoding opaque vendor error messages, cross-referencing CloudWatch streams, hoping execution environment matches local machine.
Linux primitives remained stable for thirty years. Docker container runs identically on local MacBook, cheap Hetzner node, DigitalOcean droplet, or on-premise hardware. Learning Linux yields career-long dividends. Learning proprietary serverless quirks yields throwaway knowledge obsolete next framework release.
Latency Crisis: Cold Starts and Database Starvation
Serverless functions kill API performance via two architectural bottlenecks: execution engine cold starts and database connection thrashing.
Cold Start Problem
When serverless endpoint receives request after idle period, platform must provision microVM, mount runtime, pull code artifact, initialize dependencies.
Request Arrives
│
▼
[ Provision microVM ] ──> 150ms - 400ms
│
▼
[ Download / Mount Code ] ──> 50ms - 200ms
│
▼
[ Boot Runtime (Node/Python) ] ──> 100ms - 300ms
│
▼
[ App Init (Import packages, DB handshake) ] ──> 200ms - 1000ms
│
▼
Execute Business Logic ──> 5ms
│
▼
Response Sent (Total latency: 505ms - 1905ms)
Node.js, Python runtimes face 200ms to 800ms delays. Java, heavy frameworks face multi-second stalls. Users suffer unacceptable p99 latency spikes.
Pre-warming functions requires scheduled ping scripts, which defeats on-demand cost model entirely.
Long-running Docker container on VPS avoids lifecycle thrashing. Application boots once. Node.js event loop stays warm. Framework keeps parsed routes, compiled bytecode, memory allocations hot in RAM. Incoming request hits listening socket; response leaves in 4 milliseconds.
Connection Pooling Catastrophe
Relational databases like PostgreSQL, MySQL rely on stateful connection models. Establishing TCP handshake, authenticating user, allocating backend process memory requires expensive computation per connection.
Production apps use connection pool (HikariCP, pg-pool, PgBouncer) holding open 10 to 50 persistent connections.
Serverless functions scale horizontally by spinning up isolated execution environments:
[ Lambda 1 ] ──(1 conn)──┐
[ Lambda 2 ] ──(1 conn)──┤
[ Lambda 3 ] ──(1 conn)──┼──> [ PostgreSQL Instance ]
... │ (Max Connections: 100)
[ Lambda 150 ] ─(1 conn)─┘ * CRASH: connection limit exceeded
Each function instance opens dedicated connection. Traffic burst of 500 concurrent users triggers 500 Lambda invocations, exhausting database connection limit instantly.
Vendor response: buy more managed middleware. AWS sells RDS Proxy; venture-backed startups sell serverless database wrappers (Prisma Accelerate, Neon, Supabase connection poolers).
Developers introduce another network hop, another point of failure, another recurring invoice to solve problem created by serverless design itself.
Persistent container running alongside PostgreSQL communicates over internal Docker bridge network or local UNIX socket. Zero network serialization tax. Zero dropped connections.
Cost Math: Vercel/AWS vs Hetzner VPS
Look at actual production math for standard SaaS backend: API server, relational database, Redis cache, 1 TB monthly egress, 15,000,000 requests monthly.
Stack A: "Modern" Serverless Architecture
- Frontend + Edge API: Vercel Pro ($20/seat/mo) + Edge Function execution fees + Fast Data Transfer overages.
- Serverless Compute: AWS Lambda (1024MB RAM, 200ms average execution, 15M requests) = $50.00.
- API Gateway: HTTP API invocation fees = $15.00.
- Database: AWS Aurora Serverless v2 (minimum 0.5 ACU baseline, scaling to 2 ACU) = $90.00 - $180.00.
- Connection Pooling: AWS RDS Proxy = $30.00.
- Cache: AWS ElastiCache Serverless = $50.00.
- Egress: AWS standard data transfer out ($0.09/GB for 1 TB) = $90.00.
- Observability: Datadog / New Relic APM to trace distributed functions = $120.00.
Total monthly burn: $465.00 - $600.00+
Stack B: Boring Kreasi Kita Architecture
- Hardware: Hetzner Cloud CCX23 (Dedicated vCPU, 4 Cores, 16 GB RAM, 100 GB NVMe SSD) = €24.00 (~$26.00).
- Bandwidth: 20 TB included free (Zero egress tax).
- Platform Management: Coolify (Self-hosted, open-source PaaS) = $0.
- Database: Native PostgreSQL container using local NVMe volume = $0.
- Cache: Native Redis container = $0.
- Reverse Proxy: Caddy container handling automated Let's Encrypt TLS = $0.
- Observability: Prometheus + Grafana container stack = $0.
Total monthly burn: ~$26.00
+-----------------------------------+--------------------+--------------------+
| Expense Category | Serverless Stack | Boring VPS Stack |
+-----------------------------------+--------------------+--------------------+
| Compute (15M reqs, 1GB RAM) | $65.00 (Lambda+GW) | Included in VPS |
| Database (PostgreSQL + Pooling) | $150.00+ | Included in VPS |
| Redis In-Memory Cache | $50.00 | Included in VPS |
| Egress Bandwidth (1 TB) | $90.00 | Free (20 TB pool) |
| Observability / Logging | $120.00 | Included in VPS |
| Platform Seats | $40.00 (2 seats) | $0 |
+-----------------------------------+--------------------+--------------------+
| TOTAL MONTHLY COST | ~$515.00 / month | ~$26.00 / month |
+-----------------------------------+--------------------+--------------------+
| Annual Run Rate | $6,180.00 | $312.00 |
+-----------------------------------+--------------------+--------------------+
Serverless setup costs twenty times more annually. Worse, performance remains strictly inferior due to network hops and cold starts.
Production Blueprint: VPS, Docker Compose, Coolify
Deploying containerized infrastructure does not require deep Kubernetes expertise. Kubernetes for early or mid-stage apps introduces unnecessary operational overhead.
Modern tooling delivers seamless Git-push workflows on single machine.
[ GitHub Repository ]
│
(git push)
│
▼
[ Coolify Control Plane ]
│
(Build & Deploy)
│
┌────────────────────────┴────────────────────────┐
│ HETZNER VPS │
│ │
│ ┌───────────────────────────────────────────┐ │
│ │ Caddy Reverse Proxy │ │
│ │ (Port 80/443, SSL Automation) │ │
│ └─────────────────────┬─────────────────────┘ │
│ │ │
│ ┌───────────────┴───────────────┐ │
│ │ internal docker network │ │
│ ▼ ▼ │
│ ┌───────────┐ ┌───────────┐ │
│ │ App Node │ ──(unix/bridge)──>│ Postgres │ │
│ │ Container │ │ Container │ │
│ └─────┬─────┘ └───────────┘ │
│ │ │
│ ▼ │
│ ┌───────────┐ │
│ │ Redis │ │
│ │ Container │ │
│ └───────────┘ │
└─────────────────────────────────────────────────┘
Self-Hosted Engine: Coolify
Kreasi Kita deploys apps using Coolify. Coolify acts as self-hosted alternative to Vercel and Heroku.
- Runs on single shell command on Ubuntu machine.
- Hooks directly into GitHub webhooks.
- Builds Dockerfiles automatically on commit.
- Handles zero-downtime rolling deployments.
- Provides GUI for monitoring, environment secrets, persistent volumes.
Developer experience matches Vercel: push to GitHub main branch, build triggers, site updates. Infrastructure remains fully owned, hosted on isolated server without vendor lock-in.
Production docker-compose.yml
Production configuration requires no complex distributed setup:
services:
caddy:
image: caddy:2-alpine
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
networks:
- internal_net
api:
build:
context: .
dockerfile: Dockerfile
restart: always
environment:
DATABASE_URL: postgresql://app_user:${DB_PASSWORD}@postgres:5432/app_prod?sslmode=disable
REDIS_URL: redis://redis:6379
PORT: 3000
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
networks:
- internal_net
postgres:
image: postgres:16-alpine
restart: always
environment:
POSTGRES_DB: app_prod
POSTGRES_USER: app_user
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app_user -d app_prod"]
interval: 5s
timeout: 5s
retries: 5
networks:
- internal_net
redis:
image: redis:7-alpine
restart: always
volumes:
- redisdata:/data
networks:
- internal_net
volumes:
caddy_data:
caddy_config:
pgdata:
redisdata:
networks:
internal_net:
driver: bridge
System runs inside private network. PostgreSQL, Redis shut off from public internet; Caddy exposes ports 80/443.
Database backups execute via standard cron job dumping compressed WAL archives to S3-compatible bucket (Cloudflare R2 or Backblaze B2) for pennies monthly.
What About Scalability?
Standard objection: "Single server cannot scale to meet venture-scale demand."
Premise wrong. Vertical scaling limits dramatically expanded past decade.
Single AMD EPYC bare-metal server delivers 64 cores, 128 threads, 256 GB RAM, enterprise NVMe storage for under $300 monthly.
What can that hardware handle?
- Well-written Go or Rust API: 50,000+ requests per second.
- Optimized Node.js or Fastify server: 10,000+ requests per second.
- Tuned PostgreSQL instance: 15,000 complex queries per second.
Ninety-nine percent of businesses never exceed these numbers. Teams introduce distributed system bugs, network partitioning failures, massive AWS bills preparing for scale they will never hit.
When traffic finally exceeds single machine capacity:
- Separate database to dedicated hardware node.
- Place stateless containerized API nodes behind Caddy or HAProxy load balancer.
- Keep Redis caching hot query paths.
Linear, pragmatic scale path without rewriting applications for proprietary runtime environments.
When Serverless Actually Fits
Serverless runtime useful for narrow set of technical requirements. Kreasi Kita leverages functions for:
- Massive, unpredictable asynchronous event bursts: processing 10,000 webhook payloads simultaneously from third-party vendor.
- Heavy background crunching: processing uploaded images, running FFmpeg video slicing jobs, generating large PDF documents.
- Infrequent scheduled operations: cron job firing once daily needing zero continuous memory presence.
If system responds to human user clicking link in browser or API request waiting synchronously on HTTP response: avoid serverless. Keep workloads in persistent, long-running processes.
Practical Action Plan
To reduce cloud burn and increase baseline application speed, take direct steps:
- Stop starting greenfield projects on serverless backends. Use NestJS, Go, Django, Fastify, or Laravel inside standardized Docker container.
- Benchmark local latency against serverless endpoints. Measure real p99 numbers, cold starts included.
- Audit vendor invoices. Calculate spending across AWS Lambda, Vercel, Supabase, CloudWatch. Compare against single Hetzner, OVH, or DigitalOcean box.
- Standardize deployments using Open Container Initiative (OCI) images. Containerized applications deploy anywhere. Proprietary function code binds software to single platform.
Building reliable software requires understanding underlying primitives. Stop paying serverless tax to avoid learning Linux basics.
Need architecture review or assistance decoupling infrastructure from costly cloud platforms? Engineer high-performance systems with Kreasi Kita.<p class="blog-internal-links">For the implementation path, explore our <a href="/services/web-development">web development built for predictable deployment and operations</a>. Continue with <a href="/blog/edge-runtime-delusion-relational-database-reality">the relational database reality behind edge runtimes</a>.</p>
ABOUTPROJECTS