Jean Galea

AI, Investing, Health, and Building Businesses

  • Start Here
  • AI & Tech
    • AI
    • Tech
    • Modern Web Stack
    • Business
  • Investing
    • Investing Basics
    • Crypto
    • Stocks
    • P2P Lending
    • Real Estate
    • Calculators
    • Dividends
    • FIRE & Early Retirement
    • European Investing Hub
  • Life
    • Essays
    • Barcelona
    • Padel
    • Health & Fitness
    • Hobbies
    • Family
  • About
    • My Story
    • Projects
    • AI Consultancy
    • Plugins
    • Speaking
  • Blog
  • Community
    • Good Life Collective
    • Daily Driver AI
  • Search

Serverless and Edge Functions, Finally Explained

Last updated: October 31, 2026Leave a Comment

This is part of a series on the modern web stack, written from a WordPress developer’s seat for people who’ve built on the web for years and still hit stack terms they can’t define. The goal is literacy, enough that you can read any stack list and know what each piece does.

Each post has a 10-15 minute audio companion, generated with NotebookLM, for the gym or the commute.

“Serverless” has been the most misnamed concept in web development for about a decade. There are servers. The word describes what you don’t see, not what doesn’t exist. The first person who explained it to me used the word “magic” four times, and I left more confused than I arrived.

“Edge” showed up a few years later and made it worse: edge functions, edge runtime, edge middleware, edge databases. Sometimes it means “close to the user,” sometimes “constrained runtime,” sometimes both, and sometimes it’s a Cloudflare marketing slide.

This post defines both terms, covers what they cost and where they break, and shows how a WordPress developer can think about them.

What Serverless Means

Start with the model you already have. A WordPress request goes from the visitor to Nginx, then PHP-FPM, which boots WordPress, which queries MySQL, which feeds PHP rendering the HTML. The server is always running. PHP-FPM keeps a pool of warm workers, the next request reuses them, memory is shared and database connections persist.

Serverless drops the always-running process. When a request arrives, the platform spins up a container, runs your code, returns the response and tears the container down. The next request might land on a fresh container or a recently used one, so your code can’t assume anything persists between requests.

Three things follow from that.

Pricing changes shape

You pay for invocations and execution time instead of a server. Ten requests an hour cost almost nothing, and ten million cost per request.

Cold starts exist

When a new container has to boot, the first request takes longer, from 200ms to several seconds. After a few idle minutes the next request is cold again. It’s the most visible serverless cost, and platforms have put a lot of engineering into shrinking it with smaller runtimes, lazy loading and persistent connections.

Long-running work is awkward

A serverless function usually has to finish within seconds, with limits between 15 and 300 seconds depending on the platform. Processing a large file, running a long job or holding a WebSocket open for ten minutes calls for a long-running runtime such as Fly.io, Railway or a traditional VM, or for a queue and worker pattern. The hosting options beyond Kinsta cover where those fit.

What Edge Means

In 2026 “edge” covers two related things.

Geographic edge

Your code runs in datacenters around the world, close to your users. A request from Lisbon hits a server in Lisbon, and one from Tokyo hits Tokyo. The gain is latency: a 30ms ping instead of 200ms.

Constrained runtime

Edge functions run in a lightweight environment, often built on V8 isolates instead of full Node containers. They start in low single-digit milliseconds against hundreds for traditional serverless, but they come with limits: no filesystem access, no full Node API, and only a subset of npm packages work. Cloudflare Workers, Vercel’s Edge Runtime and Deno Deploy all use this model.

The two usually come together, because edge runtimes are small enough to deploy everywhere. You can have one without the other, though. Vercel’s edge runtime runs globally, but for most developers the runtime constraints matter more than the geography.

The WordPress Analogue

A WordPress server is a buffet line. It’s always prepared and always running, and you pay to keep it warm whether anyone is eating or not.

Serverless is a kitchen that cooks to order. The kitchen is staffed, because the platform handles the infrastructure, but nobody fires a pan until you order. The first order after a quiet spell waits longer, which is the cold start. Many orders in parallel scale up cleanly, and you pay per dish.

Edge is the same kitchen with a branch in every neighborhood, so your dish travels less.

The Flavors of Serverless and Edge

These are the main options in 2026:

Type Examples Cold start Best for Watch out for
Container serverless AWS Lambda, Vercel Node Functions, Google Cloud Run 200ms-2s Full Node APIs, larger dependencies Cold starts; long-running work isn’t allowed
Edge runtime (V8 isolates) Cloudflare Workers, Vercel Edge, Deno Deploy 1-50ms Latency-sensitive routes, middleware Limited Node API, smaller bundle limits
Container always-on Fly.io, Railway, Render None (always warm) Long-running work, WebSockets, full Node You pay for idle time
Static + ISR Vercel ISR, Next.js static export None (pre-built HTML) Content-heavy pages with occasional updates Build times scale with site size
Serverless functions on edge data Cloudflare Workers + D1/KV 1-50ms Read-heavy global apps Constrained writes, limited query power

Most modern apps mix several of these in one project. A Next.js app on Vercel might run:

  • The marketing pages as static HTML served from the CDN
  • The blog pages as ISR, regenerated on a schedule
  • The auth middleware on the edge runtime for low latency
  • The dashboard data fetching as Node functions, with full API access and longer cold starts
  • Background jobs on a separate platform, such as Fly.io with a queue or a cron worker

That composition is the real modern stack, and “serverless or not” is rarely a yes-or-no question.

What This Changes for WordPress People

There are three practical implications.

First, “where does this code run” becomes a decision per route instead of a setting on the host. A login form might run on the edge for low-latency rate limiting, while a checkout flow runs on a Node function because it needs Stripe’s full SDK.

Second, scaling stops requiring planning. A successful WordPress site forces capacity decisions: a bigger VPS, a load balancer, a read replica. Serverless platforms scale invisibly until you hit a different limit, such as database connections or third-party API rate limits. The bottleneck moves to the data layer, which is why managed databases now ship connection poolers, as covered in Beyond Shared MySQL.

Third, AI coding tools assume this model. Most AI-generated server code expects a serverless or edge-like runtime. If an agent writes a feature for you, knowing the constraints (no filesystem, stateless, short execution) helps you spot code that will fail silently in production.

The Constraints That Catch You

Stateless is a real constraint

Nothing you write to the filesystem persists, and in-memory caches don’t carry across requests. Any state has to go to the database or a shared cache such as Redis or Cloudflare KV. Code that works on a traditional Node server can fail in subtle ways here.

Connection pooling is mandatory

Each invocation wants a database connection, and without pooling you exhaust Postgres connection limits at modest traffic. Managed databases like Supabase and Neon ship poolers. Configure them early.

Cold starts can hide

A site that feels fast in your testing can serve cold starts to real users. Use synthetic monitoring such as Vercel Analytics or Sentry Performance to measure p95 latency, because the median hides them. The observability post covers the wider toolkit for a stack you can’t SSH into.

Edge runtime feels like Node and isn’t

A library you depend on might use a Node API that doesn’t exist on the edge. The error often shows up at runtime and not at build time. Vercel and Cloudflare both publish compatibility tables, so read them before deciding which functions go to the edge.

Cost can spike on bot traffic

Pay-per-invocation pricing means a misbehaving bot or scraper can run up your bill. Set spend caps where the platform supports them, and add per-IP rate limiting at the edge layer.

Learn the Serverless Model

For video, Fireship’s “Serverless in 100 Seconds” is tiny and well framed. Cloudflare’s developer channel has longer Workers walkthroughs worth watching even if you stay on Vercel, because the contrast sharpens the picture.

Three docs are worth bookmarking. The Vercel Functions docs have a Runtimes page that lays out exactly what you can do in Node versus Edge. The Cloudflare Workers docs have compatibility pages that are required reading before you commit to Workers for anything non-trivial. The AWS Lambda developer guide is worth a read for its first chapter alone, which sets the baseline every other serverless platform reacts to.

The next post brings containers back: Docker for WordPress developers, what it is, and when you need it.

Related

Cloudflare Workers pricing page comparing the Workers Free and Workers Paid plans
Cloudflare Workers vs Hetzner vs DigitalOcean: How I Decide Where an App Runs
The Vercel homepage showing its Agentic Infrastructure headline
Hosting Beyond Kinsta: Vercel, Fly, Railway, Cloudflare, and Friends
Beyond Shared MySQL: Cloud Databases for WordPress Developers
iCloud Explained: Storage, Backup, Photos and iCloud Drive
Sequence-of-Returns Risk Explained
carry trading
Carry Trade Explained: How It Works, Risks, and Crypto Opportunities (2026)

Filed under: Modern Web Stack for WordPress Developers

Part 10 of 16 · Modern Web Stack for WordPress Developers

← PreviousHosting Beyond Kinsta: Vercel, Fly, Railway, Cloudflare, and FriendsNext →Docker for WordPress Developers
All 16 modules
  1. Why Modern Web Feels Alien to WordPress Devs
  2. JavaScript and TypeScript for PHP People
  3. React, in WordPress Terms
  4. Next.js: The WordPress of React
  5. When NOT to Use Next.js
  6. Beyond Shared MySQL: Cloud Databases for WordPress Developers
  7. From WPDB to Drizzle, Prisma, and Kysely
  8. Auth in 2026: What Replaced wp_users
  9. Hosting Beyond Kinsta: Vercel, Fly, Railway, Cloudflare, and Friends
  10. Serverless and Edge Functions, Finally Explained
  11. Docker for WordPress Developers
  12. CI/CD: Goodbye FTP, Hello GitHub Actions
  13. Observability When You Can't Just SSH In
  14. Tailwind, shadcn/ui, and the New Design-System Meta
  15. Headless WordPress: The Bridge
  16. How the Pieces Wire Up: A Modern Stack Integration Tour

About Jean Galea

I build things on the internet and write about AI, investing, health, and how to live well. Founder of AgentVania and the Good Life Collective.

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords or links in the name field.

Jean Galea

Founder | AI builder | Dad of three | Athlete

Follow @jeangalea

  • My Padel Journey
  • Affiliate Disclaimer
  • Cookies
  • Contact

Copyright © 2006 - 2026