Guest

Published at October 8, 2026

Should You Use Serverless? Pros, Cons, and When It Makes Sense

Article Image

Your staging API got 12 requests yesterday and cost $0.03. Production got hammered at 9 a.m., scaled to 400 concurrent executions, and tripped the database connection limit before anyone finished their coffee. Both ran on the same serverless stack. That's the whole debate in one morning.

Serverless isn't a religion. It's a billing model and an ops contract: you ship functions or containers, the cloud vendor runs them when events show up, and you pay for invocations and compute seconds instead of renting servers that hum at 4% CPU all night. For some teams that's freedom. For others it's a surprise bill and a latency cliff. This piece is for engineers, founders, and platform leads who need a straight answer before they commit the next microservice.

Below you'll get what changed in 2025–2026, where serverless wins, where it hurts, and a few checks you can run this week without a six-month architecture review. There's an FAQ at the end for the questions people Google after the first production incident.

What "serverless" means in 2026 (and what it doesn't)

People still argue about the label. Servers exist. You just don't patch them on Tuesday nights.

In practice, serverless usually means one of two things:

Function-as-a-service (FaaS). AWS Lambda, Azure Functions, Google Cloud Functions. You upload code (or a container image), wire triggers (HTTP, queues, storage events), and the platform spins execution environments on demand.

Serverless containers. AWS Fargate, Google Cloud Run, Azure Container Apps. You bring a container; the platform scales instances and handles the control plane. Longer requests and custom runtimes are easier here than on classic Lambda.

Backend-as-a-service (Auth0-style auth, Firebase, managed GraphQL) sometimes gets lumped in. Same idea: managed capacity, usage-based pricing, less fleet management.

What serverless does not guarantee: infinite scale without design work, zero ops, or automatic cheapness. You still own architecture, data models, observability, and security boundaries. The vendor owns the hypervisor and the scheduler.

Why the question keeps coming back

Cloud spend keeps climbing, and a big chunk of platform budgets sits in PaaS-style services. Gartner forecast worldwide public cloud end-user spending at $723.4 billion in 2025, with cloud application infrastructure services (PaaS) at about $208.6 billion of that total. Serverless functions and serverless containers live inside that bucket.

Analysts disagree on the exact serverless market size (definitions vary), but direction is clear: more event-driven apps, more API glue, more teams trying to avoid running Kubernetes unless they have to. Gartner has also predicted that more than half of container deployments will involve serverless container management by 2027, up from under 25% in 2024. Whether you buy that timeline or not, the hiring market has already voted. Job posts ask for Lambda and Cloud Run the way they used to ask for "some AWS experience."

So the question isn't "is serverless trendy?" It's "does our traffic shape and team shape fit what we're buying?"

Pros: what you actually gain

You stop paying for idle

The headline benefit is real for bursty work. A cron job that runs 200 seconds a day shouldn't sit on a $40/month instance. FaaS bills per request and per gigabyte-second (with minimum granularity that varies by cloud). Dev and test environments that go quiet on nights and weekends often land in single-digit dollars until someone runs a load test.

Elastic scale without a runbook page

When S3 drops 10,000 objects into a bucket and each one fires a function, the platform fans out. You don't pre-provision capacity for peak Black Friday on a Tuesday in March. That matters for webhook processors, ETL fan-out, and image thumbnailing after uploads.

Less toil on the box

No SSH for kernel patches. Runtimes get updated on the vendor's schedule (which is its own risk, but it's a trade). Small teams ship faster when nobody owns autoscaling groups for a sidecar service.

Event-native wiring

Queues, streams, and storage notifications are first-class. Lambda behind SQS or EventBridge is boring in a good way. You're not running a worker daemon that polls an empty queue at 3 a.m.

Security surface can shrink (if you're disciplined)

Functions can run with tight IAM roles, short lifetimes, and no persistent shell. That's not automatic. A sloppy IAM policy on a Lambda is still a sloppy policy. Done right, blast radius per unit of compute is smaller than a shared EC2 box running six services.

2026 quality-of-life upgrades on AWS

If you haven't looked at Lambda lately, the feature set moved. SnapStart cuts JVM and Python cold paths by snapshotting initialized environments. Graviton (arm64) is often the better default for price per watt. Response streaming helps LLM proxies and other slow handlers return bytes before the full response is ready. Lambda Managed Instances, announced at re:Invent 2025, lets you run the Lambda programming model on EC2 capacity with multiconcurrency and Savings Plan pricing when traffic stops being spiky.

None of that makes Lambda magic. It does mean "we skipped serverless in 2019 because Java cold starts" is an outdated excuse unless you've re-measured.

Cons: the bills and the footguns

Cold starts and tail latency

When no warm execution environment is available, the platform downloads your package, starts the runtime, runs init code, then hits your handler. AWS documents this lifecycle plainly: cold starts add latency and you're billed for initialization time. Most invocations are warm in steady production, but p99 is what users feel.

VPC-attached functions historically made this worse. Networking improvements helped, but latency-sensitive APIs still need provisioned concurrency, SnapStart, or a different compute choice. Provisioned concurrency works. It also reintroduces a standing charge, which changes the finance story.

Time, memory, and concurrency limits

Lambda's 15-minute cap still rules out long video transcodes unless you chain steps or move to containers. Memory and CPU are coupled on many FaaS platforms. Need 10 GB RAM but little CPU? You might overpay.

Concurrency explosions are a feature until they aren't. A misconfigured retry loop or a public endpoint without rate limiting can spin thousands of concurrent executions. You pay for that. So can downstream systems.

The database connection storm

This one kills greenfield serverless apps. Each concurrent execution environment may open its own DB connection. Four hundred Lambdas can mean four hundred connections unless you multiplex. RDS Proxy (or PgBouncer, or a proxy tier on other clouds) is standard architecture, not a nice-to-have. ORMs that rely on prepared statements can pin proxy sessions and kill multiplexing efficiency. You learn that in production once.

Observability and debugging get weird

Distributed traces across 50 tiny functions beat one monolith log file for some problems and lose for others. Local dev still friction: emulators exist, but "works on my laptop" diverges from cloud IAM and trigger semantics. Budget time for structured logging, trace IDs, and alarms on error rate and duration and throttles.

Vendor coupling (honest version)

Deep use of API Gateway, Step Functions, DynamoDB streams, and Cognito triggers ties you to AWS. Vendor "lock-in" is usually switching cost (migration time, retraining, data movement), not a literal inability to leave. Portable handlers, standard HTTP, and containers reduce exit pain. Pretending multicloud is free usually just spreads complexity.

Steady traffic can cost more than containers

FinOps teams have run the spreadsheets for years. High-volume, always-on APIs often beat function pricing once utilization climbs. Independent 2026 break-even analyses put the crossover around 40–50% duty cycle (fraction of a month your code is actually executing), depending on memory, region, and whether you're paying for warm capacity. Under that band, serverless often wins. Above it, reserved container capacity or Lambda Managed Instances deserve a spreadsheet.

Compliance and data residency still your job

Running in eu-west-1 doesn't make GDPR go away. You still map subprocessors, log retention, encryption keys, and who can invoke what. Serverless doesn't remove audit work. It sometimes hides where data touched disk.

When serverless makes sense

Use this as a checklist, not a scorecard gospel.

Traffic is spiky or sparse. Webhooks, nightly batches, internal tools with human-paced usage, image processing on upload, queue consumers. If average CPU over a week would look embarrassing on a chart, serverless probably fits.

Work is stateless and short. Transform a message, write a row, call an API, return. Keep session state in Redis, the client, or a database; not in RAM you assume sticks around.

Time to market beats fine-grained infra control. You're a six-person product team shipping an MVP API. Operating EKS is a distraction.

Events are the product. File landed, payment succeeded, IoT reading arrived. Function-per-event maps cleanly to the business story.

You accept cloud-native primitives. Managed queues, object storage, NoSQL or proxy-fronted SQL. Fighting the platform's opinions costs more than containers would.

Latency targets match reality. Batch reporting can tolerate cold starts. A checkout button probably can't, unless you buy warmth.

When to skip serverless (or use a hybrid)

Sustained high throughput APIs. If your service never sleeps and p95 latency must stay under 100 ms without extra spend, dedicated containers or Managed Instances are worth modeling first.

Long-running workers. Anything that holds a connection open for hours (some streaming jobs, big single-pass transforms) belongs on Cloud Run, Fargate, or VMs.

Heavy in-process state. Large in-memory graphs, local ML model caches you don't want to reload every invoke, game servers. Wrong tool.

WebSockets and sticky sessions at scale. You can do it serverlessly with gateways and fan-out, but complexity jumps. Many teams run the socket layer on long-lived containers and keep serverless for everything else.

Strict portable multicloud as a top priority. Standard containers on Kubernetes or Nomad may hurt less than rewriting Step Functions every quarter.

Tiny team, but legacy monolith dependencies. If every function needs a VPN into a mainframe session pool, serverless saves less than you'd hope.

Hybrid is normal. API on Fargate, thumbnail Lambda on S3 events, Step Functions glue in between. The shame is only in pretending one compute model won everything.

Picking a service (AWS-centric, because that's where the questions land)

NeedCommon pickWhy
Event glue, cron, webhooksLambdaTriggers, IAM, mature ecosystem
HTTP API with burst + scale to zeroLambda + API Gateway or Function URL; or Cloud Run on GCPMeasure cold start vs min instances
Arbitrary runtime, >15 min jobsCloud Run, Fargate, Container AppsContainer contract, fewer duration cliffs
Edge auth, redirects, A/B flagsCloudflare WorkersLow cold-start at edge
Steady Lambda code path, EC2 economicsLambda Managed InstancesSame handler model, different capacity layer

AWS's serverless decision guide compares Lambda vs Fargate vs App Runner on scaling speed, cold starts, and when SnapStart or provisioned concurrency applies. Read it with your traffic histogram open.

Practical tips before you commit

  1. Graph invocations and duration for two weeks on whatever you have now. Guesswork picks the wrong winner.
  2. Put a proxy in front of SQL before load testing serverless writers. Test with realistic concurrency, not serial Postman clicks.
  3. Initialize outside the handler. DB drivers, HTTP clients, config parsing belong in init. Reuse connections cautiously (often 1 per environment with a proxy).
  4. Set reserved concurrency caps on public functions. Unlimited concurrency is a DDoS invoice.
  5. Alarm on Throttles, Errors, and Duration p99. Cost alarms too if your account allows anomaly detection.
  6. Try arm64 on AWS for interpreted languages. One architecture flag, sometimes double-digit savings.
  7. Separate "platform events" from "user-facing sync paths." Same repo, different functions, different warmth and timeout policies.
  8. Write the exit story in one page. What would we containerize first? How long would DNS cutover take? If the answer is "we have no idea," reduce native-only triggers on the critical path.
  9. For LLM endpoints in 2026, test response streaming and timeout settings. Waiting for a full 8k-token completion inside one synchronous invoke is a recipe for timeouts.
  10. Chargeback or showback early. Serverless makes engineers careless about invocation count until finance asks why March was 4× February.

Conclusion

Serverless is a strong default for event-driven, intermittent, stateless work in 2026. It's a weak default for always-on, connection-heavy, latency-obsessed services unless you've priced warmth and proxies honestly.

The mature move is to match compute to duty cycle and team skills, then revisit quarterly. Traffic grows. Managed Instances and Cloud Run revisions blur the old lines. Your 2023 "never Lambda" rule might be costing money now, and your 2021 "Lambda for everything" rule might be why the database pager won't shut up.

Run the numbers. Run a load test that opens more than one connection. Then pick serverless, containers, or both on purpose.

FAQ

Does serverless mean there are no servers?

No. It means you don't provision or patch VMs for that workload. Google, Amazon, and Microsoft still run physical machines. You outsource capacity planning and OS maintenance in exchange for less control and a different price curve.

What's the difference between serverless and traditional PaaS (like Heroku dynos)?

PaaS often bills for always-on instances or dyno hours whether traffic exists or not. Classic FaaS bills closer to actual execution. Modern serverless containers (Cloud Run, scale-to-zero Fargate patterns) sit in the middle: container image, but instance count can drop to zero. Compare minimum billable time (100 ms vs 1 ms vs per-hour tasks) when estimating cost.

Is serverless cheaper than Kubernetes?

Sometimes. Kubernetes has a fixed tax: control plane, nodes, upgrades, and someone who knows YAML at 2 a.m. Serverless avoids that until scale makes per-invocation math ugly. A three-service startup rarely needs K8s. A fifty-service org with platform engineers might spend less on reserved nodes than on millions of Lambda gigabyte-seconds.

How do you test AWS Lambda locally?

SAM CLI, Serverless Framework offline mode, and plain unit tests on handlers separated from cloud SDK calls. The gap is always IAM and trigger shape. Run at least one integration test in a sandbox account that mirrors production permissions. Local emulators won't catch "this role can't decrypt that KMS key."

Can you run Spring Boot or other JVM frameworks on Lambda?

Yes, with caveats. Package size and init time hurt cold starts unless you use SnapStart (where supported) and trim dependencies. Many teams containerize the JVM app on Cloud Run or Fargate instead and keep Lambda for smaller Node or Python handlers.

Who is responsible for security in serverless?

You own application code, secrets handling, IAM policies, network exposure (public vs private API), and dependency vulnerabilities. The provider secures the runtime isolation boundary and physical infra. Shared responsibility models don't disappear because there's no SSH.

Is serverless good for GDPR or HIPAA workloads?

It can be, if you configure regions, encryption, logging retention, and BAA coverage (on clouds that offer it) correctly. Serverless doesn't magically classify data. You still need DPIAs, data flow maps, and controls on who can invoke functions that touch PII.

What happens if we hit Lambda concurrency account limits?

New invocations throttle. Users see errors unless you request a limit increase or shed load. Set client-side retries carefully; retries during a throttle storm make things worse. Design queues in front of fragile downstreams.

Serverless vs microservices: are they the same thing?

Microservices is an architecture style (bounded services, independent deploys). Serverless is one way to host those services. You can run microservices on VMs, Kubernetes, or functions. One function per endpoint is a microservice extreme that few teams enjoy debugging.

How hard is it to migrate from Lambda to containers?

Easier if you kept business logic out of the handler and avoided exotic trigger-only code paths. Package the same code in a Docker image, expose HTTP, and swap the trigger for a load balancer. Harder if Step Functions, Cognito, and API Gateway authorizers are woven through every path. That's why the one-page exit story matters before you wire the tenth native integration.

Should startups default to serverless?

For MVPs with unpredictable traffic, often yes. You trade away some control and risk a refactor if you grow into steady high traffic. Watch database access patterns early; startups die from connection limits as often as from running out of cash.

Does provisioned concurrency eliminate cold starts entirely?

For the capacity you buy, yes, those environments stay warm. You still pay for it 24/7. Partial coverage means some users hit cold paths. Match provisioned units to measured concurrent demand during peak, not average.

Join the PitchWall blog

Insights, Product Stories & AI Trends.