Black Friday: twenty-fold traffic for two hours. Rest of month, three requests per minute. You pay a three-node Kubernetes cluster twenty-four seven — or millions of Lambda invocations billed per millisecond. One wastes the night, the other can explode the bill if the peak lasts.
Irregular load does not automatically mean serverless. Distinguish amplitude, duration, predictability, and application constraints: state, latency, persistent connections.
Read load before choosing
| Profile | Serverless advantage | Kubernetes advantage |
|---|---|---|
| Short peaks (<15 min) | Strong | Idle cluster costly |
| Long peaks (hours) | Invocation + concurrency bill | HPA on warm nodes |
| Stable baseline traffic | May cost more | Reserved / fixed nodes |
| WebSocket / streaming | Often poor fit | Long-running pods |
| Heavy batch jobs | Timeout limits | K8s CronJob |
| Cold start sensitive | Problem (P99) | Warm pods |
Serverless sells "zero idle"; Kubernetes sells "full control." Both fail if you ignore temporal traffic shape.
Serverless: where it shines
Event-driven API. Stripe webhook, upload image processing, light ETL triggered by queue.
Rapid prototyping. No cluster to run; watch lock-in and cost drift in production.
Very low unpredictable average traffic. Internal admin site, rare nightly batch.
Traps: cold start on Java or .NET with VPC attach; egress and invocation billing forgotten in budget; fragmented observability without unified tracing.
Kubernetes: where it holds
Irregular but predictable load. Known flash sales — HPA plus cluster autoscaler, nodes ready before hour H.
Long-running services. Sockets, gRPC streaming, permanent queue consumers.
Fine control. GPU affinity, custom network, sidecars, strict compliance.
Long-term cost. High baseline traffic: reserved nodes or VPS plus Compose sometimes beat cumulative Lambda.
European offers (Scaleway Serverless Containers, limited Clever Cloud functions) exist — compare jurisdiction and egress in directory.
Before shortlisting, also model human cost: a team already mastering Kubernetes absorbs a predictable peak cheaper than a rushed serverless migration. The reverse holds for a team without cluster skills — serverless buys time, not just CPU cycles.
The summit: irregular ≠ automatic serverless
Decide and move forward without blind spots
Chart traffic over thirty days at best available resolution. Shortlist serverless for short, stateless peaks and minimal operations budget. Shortlist Kubernetes or VPS with autoscale for long connections or high baseline. Consider hybrid: edge serverless plus Kubernetes core if both profiles coexist. Read Docker Compose or Kubernetes for the prior step, then compare via comparator.
Frequently asked questions
Does serverless always eliminate over-provisioning?
Often for short stateless functions. Long connections or high baseline: cluster or dedicated instances may cost less.
Does Kubernetes scale automatically like serverless?
With HPA yes, but minimum nodes still bill. Scale-to-zero with KEDA possible, more complex than native Lambda.
What serverless limits cause trouble?
Timeout, cold start, no persistent filesystem, hard debugging, monoliths poorly split without rework.
Can you mix both?
Yes: Lambda API plus Kubernetes workers plus managed DB — unified tracing mandatory.
Before choosing, plot a curve: how many minutes does your peak last, and how many zeros before the next? The graph decides more than the buzzword.
