Serverless Computing: Real Cost Analysis for Small to Mid-Size Sites

The Serverless Promise vs. Reality for Smaller Sites

Serverless computing has been pitched as the future of web hosting for years. The idea is simple: you pay only for what you use, with no idle servers burning money. For enterprise teams handling millions of requests, the math often works out. But for small to mid-size websites pulling 10,000 to 500,000 monthly visitors, the cost picture is far more complicated than the marketing suggests.

This analysis breaks down real pricing from AWS Lambda, Cloudflare Workers, Vercel, and Netlify Functions against traditional hosting options. We ran the numbers for three common site profiles to show where serverless saves money and where it quietly drains your budget.

How Serverless Pricing Actually Works

The Serverless Promise vs. Reality for Smaller Sites
The Serverless Promise vs. Reality for Smaller Sites

Every serverless platform charges based on two core metrics: the number of invocations (function calls) and the compute duration measured in GB-seconds. Some platforms add bandwidth charges, cold start penalties, or tiered pricing that kicks in at certain thresholds.

Here is what the major platforms charge as of early 2026:

AWS Lambda

$0.20 per 1 million requests. $0.0000166667 per GB-second of compute. Free tier includes 1 million requests and 400,000 GB-seconds per month. Additional charges apply for API Gateway ($1.00 per million requests), data transfer ($0.09/GB after the first 100GB), and CloudWatch logging.

Cloudflare Workers

Free plan: 100,000 requests per day. Paid plan ($5/month): 10 million requests included, then $0.30 per additional million. No duration-based billing on the standard plan. Workers run on Cloudflare’s edge network with sub-millisecond cold starts.

Vercel Functions

Hobby (free): 100GB-hours of function execution. Pro ($20/month per team member): 1,000GB-hours included. Bandwidth: 100GB free on Hobby, 1TB on Pro. Overages: $40 per 100GB-hours, $40 per 100GB bandwidth.

Netlify Functions

Free tier: 125,000 invocations and 100 hours of runtime per month. Pro ($19/month): 250,000 invocations, 200 hours. Background functions (up to 15 minutes) available on paid plans. Bandwidth: 100GB on free, 1TB on Pro.

Three Site Profiles: Running the Numbers

To make this comparison concrete, we modeled three common site types that represent the small to mid-size range. Each profile assumes a mix of static content delivery and dynamic server-side functions (form handling, API routes, database queries, authentication).

Profile A: Small Business Site (25,000 monthly visitors)

A local services company with a marketing site, contact form, booking system, and a blog. Roughly 75,000 page views per month, with about 15% of requests hitting server-side functions (form submissions, booking API calls, newsletter signups). That translates to approximately 11,250 function invocations monthly, with an average execution time of 200ms at 128MB memory.

Profile B: Content Site with Dynamic Features (150,000 monthly visitors)

A niche publication running a membership system, comment moderation, search functionality, and personalized content recommendations. Around 450,000 page views, with 25% requiring function execution. That is roughly 112,500 invocations per month, averaging 350ms at 256MB memory.

Profile C: Mid-Size E-commerce (400,000 monthly visitors)

An online store with product search, cart management, payment processing, inventory checks, and order notifications. Approximately 1.2 million page views, with 40% hitting functions. That gives us 480,000 invocations monthly, averaging 500ms at 512MB memory.

Cost Comparison: Serverless vs. Traditional Hosting

We calculated monthly costs for each profile across serverless platforms and compared them against equivalent traditional hosting (shared, VPS, and managed cloud). All figures include compute, bandwidth, and essential add-ons like SSL, CDN, and database hosting where applicable.

Platform Profile A (25K visitors) Profile B (150K visitors) Profile C (400K visitors)
AWS Lambda + API Gateway $0 (free tier) $4.80/mo $18.50/mo
Cloudflare Workers (Paid) $5/mo $5/mo $5/mo
Vercel Pro $20/mo $20/mo $20-60/mo
Netlify Pro $19/mo $19/mo $19-45/mo
Shared Hosting (SiteGround, Hostinger) $3-12/mo $12-25/mo Not recommended
VPS (DigitalOcean, Hetzner) $4-6/mo $12-24/mo $24-48/mo
Managed Cloud (Cloudways, RunCloud) $14-28/mo $28-56/mo $56-100/mo

At first glance, serverless looks like the obvious winner for Profile A. AWS Lambda’s free tier covers the entire workload. Cloudflare Workers at $5/month gives you far more headroom than you need. But these numbers hide important context.

The Hidden Costs That Change the Math

Raw compute pricing is only part of the story. Several cost factors don’t appear in the headline pricing but significantly affect your real monthly spend.

Database Hosting

Serverless functions need to connect to a database somewhere. On traditional hosting, your database runs on the same server at no extra cost. With serverless, you need a separate database service. PlanetScale starts at $39/month for production use. Neon offers a free tier with 0.5GB storage but charges $19/month for their Pro plan. AWS RDS starts at roughly $15/month for the smallest instance. Supabase offers a generous free tier but their Pro plan is $25/month.

For Profile B and C, database costs alone can add $25-50/month to your serverless bill, making the total cost comparable to or higher than a well-provisioned VPS.

Cold Starts and Performance Costs

AWS Lambda functions that haven’t been called recently take 100-500ms extra to spin up (cold starts). For Node.js functions, this averages around 200ms. For Python or Java, it can exceed 1 second. Cloudflare Workers largely avoid this problem with their V8 isolate model, showing cold starts under 5ms.

Cold starts don’t cost you money directly, but they cost you users. Google’s research shows that a 200ms delay in page load increases bounce rate by roughly 5%. If your site generates revenue, that performance tax has a dollar value.

Vendor Lock-in and Migration Costs

Each serverless platform has its own runtime quirks, deployment patterns, and proprietary APIs. Moving from Vercel’s edge functions to AWS Lambda is not a simple copy-paste job. You are rewriting deployment configs, adjusting to different timeout limits (Vercel: 10s on Hobby, 60s on Pro; Lambda: up to 15 minutes), and adapting to different environment variable systems.

Traditional hosting gives you a Linux server. Your code runs the same way on any VPS provider. Migrating from DigitalOcean to Hetzner takes an afternoon. Migrating between serverless platforms can take weeks of engineering time.

Bandwidth Surprises

Vercel and Netlify include bandwidth in their plans, but overages are expensive. Vercel charges $40 per 100GB over the included 1TB on Pro. If your site serves large images, PDFs, or video content, bandwidth costs can spike unpredictably. A single viral blog post serving a 2MB hero image to 100,000 visitors generates 200GB of transfer in a day.

On a $6/month DigitalOcean droplet, you get 1TB of transfer included. On Hetzner’s cloud VPS, bandwidth is essentially unlimited for normal web traffic within their network.

Where Serverless Actually Saves Money

Despite the hidden costs, serverless computing genuinely reduces expenses in specific scenarios.

Highly Variable Traffic

If your site gets 500 visitors on weekdays and 50,000 on weekends (event sites, seasonal businesses, campaign landing pages), serverless scales without you paying for idle capacity. A VPS sized for peak traffic wastes money 5 days out of 7. Serverless charges you nothing during quiet periods.

Microservices and API Endpoints

Running a handful of API endpoints (webhook receivers, form processors, scheduled tasks) on serverless makes sense even if your main site lives on traditional hosting. A contact form handler that fires 200 times per month costs essentially nothing on Lambda. Running a full VPS just for that is wasteful.

JAMstack Sites with Minimal Dynamic Logic

If 95% of your site is static HTML served from a CDN and you only need functions for a newsletter signup and a search endpoint, serverless is the right fit. Cloudflare Workers at $5/month or Netlify’s free tier handles this workload without breaking a sweat. You get global edge distribution, automatic scaling, and zero server maintenance.

Where Traditional Hosting Still Wins

For sites with consistent traffic and heavy server-side processing, traditional hosting remains more cost-effective.

Database-Heavy Applications

If every page request queries a database (WordPress sites, forums, e-commerce with real-time inventory), the combined cost of serverless compute plus a managed database service exceeds what a $24/month VPS delivers. A 4GB RAM VPS from DigitalOcean or Vultr runs your application server and database on the same machine with sub-millisecond latency between them.

Predictable, Steady Traffic

A content site pulling 200,000 monthly visitors with consistent daily traffic has no scaling surprises. A properly configured VPS handles this load without autoscaling complexity. You pay the same amount every month, and you know exactly what that amount is. No surprise bills from a traffic spike or a bot crawl triggering thousands of function invocations.

Full-Stack Applications

Applications that need WebSocket connections, long-running processes, cron jobs, file system access, or persistent in-memory caching don’t map well to serverless constraints. Lambda’s 15-minute timeout and stateless execution model means you need additional services (ElastiCache, SQS, Step Functions) to replicate what a single server does natively. Each additional AWS service adds cost and complexity.

The Real Decision Framework

After running these numbers across dozens of site configurations, a clear pattern emerges. The decision isn’t really about serverless vs. traditional. It’s about your traffic pattern, your technical requirements, and your tolerance for operational complexity.

Choose serverless if: your traffic is highly variable, your dynamic logic is limited to a few endpoints, you want zero server maintenance, and you are comfortable with vendor-specific deployment patterns.

Choose traditional hosting if: your traffic is predictable, your application is database-heavy, you want full control over your stack, and you prefer fixed monthly costs with no surprise overages.

Choose a hybrid approach if: your main site runs on a VPS but you offload specific tasks (image processing, email sending, webhook handling) to serverless functions. This gives you the cost predictability of traditional hosting with the scaling benefits of serverless where it matters most.

Bottom Line: Total Cost of Ownership

For the majority of small to mid-size sites, a $12-48/month VPS with proper caching and a CDN (Cloudflare’s free plan includes global CDN) delivers better value than a fully serverless architecture. The serverless bill might look smaller on paper, but once you add database hosting, monitoring, and the engineering time to work within platform constraints, the total cost of ownership often exceeds traditional hosting.

The exception is clear: if your site is mostly static with occasional dynamic functions, or if your traffic pattern is extremely spiky, serverless platforms like Cloudflare Workers ($5/month) or AWS Lambda (free tier) are hard to beat on pure economics.

Don’t choose your hosting architecture based on what’s trendy. Choose it based on what your site actually does, how your traffic actually behaves, and what your real monthly budget looks like when all costs are included.