serverless
54 articles on serverless — what drives the cost, how it is priced, and where the savings actually are.
How much does it cost to run a mobile app backend?
A serverless backend for a mobile app with 250,000 monthly active users costs about 1,558 dollars a month, and managed authentication is 71 percent of it. Here is the breakdown and the one line worth challenging.
How much does it cost to run a webhook processing service?
A service receiving 30 million webhooks a month, processing them with retries, and archiving payloads costs about 506 dollars on AWS. Here is the breakdown, including the 150 dollar mistake almost everyone makes.
How much does it cost to run a REST API at 1 million requests a day?
A REST API handling 30 million requests a month costs 267 dollars a month serverless or 579 dollars on containers. Here is the full breakdown of both, and where the crossover actually sits.
Cold start billed duration: what initialization really costs you
Cold starts are usually discussed as a latency problem, but they also change what you pay. Initialization time, runtime choice, package size, and burst shape all land on the invoice. Here is the arithmetic.
Provisioned concurrency break-even math: when warmth pays for itself
Provisioned concurrency trades a usage bill for a capacity bill. There is a clean break-even point based on utilization, and most teams sit on the wrong side of it. Here is how to compute yours.
Lambda memory as a cost lever: finding the real sweet spot
More Lambda memory means more CPU, so a bigger function can be cheaper than a smaller one. The relationship is not linear and the sweet spot is workload-specific. Here is how to find it with numbers.
Workflow orchestration cost: state machines versus code
Orchestrating a multi-step process can be a managed state machine, a chain of queues, or a single long-running function. Each has a different cost curve. Here is where each one wins.
Dead letter queue cost: what failure handling adds to the bill
Dead letter queues look free until a poison message or a bad deploy fills them. The cost is in redrive traffic, retry amplification, and storage of messages nobody reads. Here is the real arithmetic.
Fan-out pattern cost: what one event costs when it becomes ten
Fan-out multiplies one event into many deliveries, and the bill multiplies with it. Different fan-out mechanisms have very different per-delivery economics. Here is what each one costs at scale.
Function URLs versus API Gateway versus ALB: the front door cost
Three ways to put a function on the internet, three completely different pricing models. One is free, one bills per request, one bills per hour. Here is where each becomes the cheapest option.
Pairing functions with a database: the hidden cost of connections
The function is cheap, the database it talks to often is not. Connection limits, proxies, and idle capacity turn a per-request compute model into a per-hour database bill. Here is how to pair them well.
DynamoDB for spiky traffic: capacity mode under bursty load
On-demand looks expensive per request and provisioned looks cheap, until the traffic spikes. Burst shape, not average volume, decides which capacity mode costs less. Here is the arithmetic for bursty workloads.
Scheduled function cost: what a cron job really costs in serverless
A function on a one minute schedule runs 43,200 times a month whether or not there is work to do. Polling schedules are the quietest source of waste in a serverless estate. Here is the arithmetic.
Serverless image processing cost: the pipeline priced end to end
Resizing images in functions looks trivially cheap per image until you count storage, egress, ephemeral disk, and the variants you generate. Here is the full pipeline cost for a real workload.
When serverless stops being cheaper: the scale crossover
Serverless wins decisively at low and medium scale. There is a point where sustained, predictable load makes containers or instances cheaper, and it is more specific than most rules of thumb suggest.
Retry and idempotency cost: paying for the same work twice
Retries are free to configure and expensive to run. Duplicate processing multiplies compute, downstream calls, and side effects. Here is what retry policy really costs and how idempotency changes it.
Event replay cost: what it costs to run history again
Archiving events is cheap. Replaying them runs your entire downstream pipeline a second time at full price. Here is what archives, retention, and a replay actually cost.
Serverless cost per tenant: attributing a shared function bill
Serverless pricing is per request, which makes per-tenant attribution possible in a way shared servers never allow. Doing it well requires instrumenting the right dimensions. Here is the method.
Chatty function chains: what waiting costs in serverless
When one function calls another synchronously, you pay for both at once. Chains of waiting functions are the most expensive common anti-pattern in serverless, and they are easy to spot.
Functions in a VPC: what network attachment really costs
Putting a function in a VPC is free in itself. What it pulls in is not: a NAT gateway for outbound access, data processing charges, and the choice between endpoints and gateways. Here is the bill.
SQS FIFO versus standard: what ordering costs per message
FIFO queues cost 25 percent more per request, but the real price difference is throughput, batching behaviour, and the downstream design ordering forces. Here is the full comparison.
Serverless database idle cost: what you pay to do nothing
Serverless databases promise you pay only for what you use, but most of them have a floor. Understanding the minimum capacity charge is the difference between a $5 development database and a $44 one.
Lambda cost per million invocations: a worked pricing breakdown
Lambda cost per million invocations depends on two levers, the flat per-request fee and the per-GB-second duration charge, and the duration part usually dominates. Working through real numbers shows exactly where the cost goes and which lever to pull. Here is the breakdown.
GCP Cloud Run min instances cost: what keeping instances warm costs
Cloud Run scales to zero by default, but setting a minimum number of instances keeps them warm to avoid cold starts, and those idle instances bill continuously at a reduced rate. Here is what min instances cost and when they are worth it.