Serverless vs Containerized Workloads: Cost & Performance Tradeoffs
Lambda vs Fargate vs EKS: a data-driven comparison of cold starts, sustained-throughput cost curves, and operational overhead to help you pick the right compute model per workload.
Quick Summary & TL;DR (Answer-First)
Neither serverless nor containers is universally cheaper — the crossover point depends on invocation frequency, execution duration, and how much idle capacity is worth paying for versus how much cold-start latency is acceptable. As a rule of thumb, workloads under roughly 2-3 million invocations per month with bursty, unpredictable traffic favor Lambda; sustained, high-throughput services running most hours of the day favor Fargate or EKS. See the CloudLink FinOps cost modeling practice for how this crossover analysis gets built per workload.
Not sure which model fits a given workload? Message CloudLink architects on WhatsApp at +1 (945) 387-6031 (wa.me/19453876031) for a free cost comparison.
Cold Starts: Where Serverless Loses Time
Lambda cold starts add 100ms to 1 second of latency (more for JVM or large-dependency functions) whenever a new execution environment spins up. Provisioned Concurrency eliminates this at a fixed hourly cost per instance — which, if traffic is sustained enough, erodes most of the pay-per-use advantage Lambda otherwise offers.
Containers running on Fargate or EKS have no per-request cold start once the service is running, but pay for idle capacity between requests. For latency-sensitive, always-warm services (checkout APIs, auth services), this makes containers the safer default regardless of raw cost.
Language runtime matters as much as the compute model here: a Go or Rust Lambda function typically cold-starts in under 100ms, while a JVM-based function with a large dependency tree can take 2-3 seconds without tuning. Before ruling out serverless for a latency-sensitive path, check whether switching runtimes closes most of the gap before switching to containers instead.
The Cost Crossover: Where Lambda Beats Fargate (and Vice Versa)
At low, bursty volume — a webhook handler firing a few thousand times a day — Lambda pay-per-100ms billing beats a container that must stay running (and billing) 24/7 waiting for the next request, often by 5-10x. As sustained request volume climbs into the tens of millions per month with even utilization, Fargate flat per-vCPU-hour pricing overtakes Lambda per-invocation cost.
Memory allocation is the lever most teams under-tune on the Lambda side of this comparison. Lambda CPU is allocated proportionally to configured memory, so a function that runs faster with more memory can end up cheaper overall even though the per-GB-second price looks higher on paper — always benchmark a few memory configurations before assuming the smallest allocation is the cheapest one.
For workloads already running Kubernetes, right-sizing the underlying nodes changes this math further in favor of containers — the Karpenter cost optimization guide covers how just-in-time node provisioning narrows or eliminates the idle-capacity penalty containers otherwise carry.
Model the crossover with real numbers rather than rules of thumb whenever the decision is close: multiply expected monthly invocations by average execution duration and memory allocation for the Lambda estimate, and multiply expected average concurrent request count by instance-hour pricing for the Fargate estimate, then compare the two across a range of traffic scenarios rather than a single point estimate.
Operational Overhead: The Cost Nobody Puts on the Invoice
Lambda has effectively zero patching, scaling, or capacity-planning overhead — the platform manages the runtime entirely. EKS, by contrast, requires ongoing node AMI patching, cluster version upgrades, and capacity planning, which is real engineering time even after autoscaling is configured.
Factor a rough $3K-$8K per month in engineering time for a moderately-sized EKS cluster ongoing care and feeding into any containers-are-cheaper comparison — this is exactly the kind of hidden cost the full FinOps playbook accounts for beyond the raw compute line item.
A Decision Framework, Not a Default
Rather than standardizing on one model company-wide, evaluate per service: invocation pattern (bursty vs sustained), latency sensitivity (can it tolerate a cold start), and team operational maturity (is there SRE bandwidth to run Kubernetes well). Event-driven, bursty workloads (image processing, webhook handlers, scheduled jobs) are close to always a better fit for Lambda.
Sustained, latency-sensitive, or already-containerized services (APIs serving steady production traffic, anything already packaged as a Docker image) are close to always a better fit for Fargate or EKS. Most mature platforms end up running both models side by side, deliberately, rather than picking one dogmatically.
Hybrid Patterns: Event-Driven Front Door, Containerized Core
The most cost-efficient production architectures rarely pick one model exclusively. A common pattern uses Lambda as the event-driven front door — handling webhooks, file-upload triggers, and scheduled jobs — while the core request-serving API runs as a long-lived containerized service on EKS or Fargate, sized for its steady-state traffic.
This hybrid split captures the pay-per-use economics of serverless for genuinely bursty, low-volume paths without forcing the always-on core service to pay per-invocation pricing at high sustained volume. It also isolates blast radius: a runaway Lambda function cannot exhaust the capacity the core API depends on.
Architecture Consultation
CloudLink architects model the real cost crossover for a specific traffic pattern rather than relying on rules of thumb, and help migrate workloads between models when the math shifts.
Get a free workload cost comparison at cloudlink.us/solutions/finops or on WhatsApp at +1 (945) 387-6031 (wa.me/19453876031).
pages.blog.ctaTitle
pages.blog.ctaDesc

