Edge Computing for Builders
Edge computing moves your code closer to users — away from centralised servers and into hundreds of points of presence worldwide. Learn Cloudflare Workers, Vercel Edge Functions, edge databases like Turso and Cloudflare D1, KV storage, Durable Objects, and how to architect applications that are fast by default.
What you'll learn
Course outline
Free — start now
Full course — $49 one-time
Edge Databases: Turso and D1
KV Storage and Edge Caching
Durable Objects: Stateful Edge
Edge Middleware Patterns
Edge Architecture Patterns
Get the full course
All 8 lessons. Build fast-by-default apps with Cloudflare Workers, Vercel Edge, and edge databases.
Written by the RadarTrek editorial team · Reviewed June 2026
About this course
Edge computing moves code execution from centralised data centres to servers that are geographically close to your users — often within 50ms of any user on earth rather than the 150-400ms round-trip to a central region. Cloudflare Workers, Vercel Edge Functions, and Deno Deploy run your JavaScript at the network edge, enabling use cases that are impractical with traditional serverless: personalisation at the CDN layer (modify HTML before it reaches the browser), A/B testing without layout shift, geolocation-based routing, JWT validation without a database round-trip, and API responses in under 50ms globally. In 2026, edge runtime is no longer experimental — it is the deployment target for production features at scale.
Edge Computing for Builders teaches you to think in the edge model, understand its constraints (no file system, limited APIs compared to Node.js, a maximum execution time of 10-50ms for most runtimes), and build features that are only possible at the edge. By the end of this course you will have deployed edge middleware that personalises content, a globally fast API endpoint, and a geolocation-aware redirect — and you will understand the tradeoffs between edge functions, serverless functions, and traditional server infrastructure that determine which runtime is right for each workload.
Frequently asked questions
What is the difference between edge functions and serverless functions?
Serverless functions (AWS Lambda, Vercel Serverless Functions) run in a single AWS region or a small set of regions. When a user in Sydney hits your US-East serverless function, they experience 200-400ms of latency just for the round-trip network time. Edge functions run in the provider's global network — Cloudflare Workers run across 300+ locations worldwide, so the same Sydney user is served from a nearby Cloudflare PoP with 15-30ms latency. The tradeoff is constraints: edge runtimes run a subset of the Web Platform APIs (no Node.js built-ins like fs, crypto is Web Crypto only) and have stricter execution time limits. Edge is best for latency-sensitive lightweight operations; serverless is best for CPU-intensive or I/O-heavy operations with Node.js dependencies.
What can I do with Vercel Edge Middleware?
Vercel Edge Middleware runs before every request in your Next.js application and can inspect and rewrite the request before it hits your pages or API routes. Common use cases: authentication (validate a JWT and redirect unauthenticated users before the page server-renders), A/B testing (serve different page variants to different users without client-side flicker), feature flags (route users to different versions of a page based on their cohort), geolocation-based content (serve different content or currency based on the user's country), and bot protection (block or challenge requests that look like scraper traffic). Edge Middleware runs in under 5ms for simple operations and does not add meaningful latency to your page renders.
How do I access a database from an edge function?
Traditional connection-pooled databases (PostgreSQL with pg) do not work well at the edge because each edge function invocation creates a new connection, and databases have connection limits. The solutions: use an HTTP-based database client that works in edge runtimes (Supabase, PlanetScale, Turso, Neon all offer edge-compatible drivers), use a connection pooler like PgBouncer or Supabase's connection pooler between your edge function and Postgres, or cache database results at the edge using the Cache API and refresh them periodically. For most edge use cases, the pattern is: check the edge cache first, fall back to your database only on cache misses, and store the result so the next request is served from cache.
What are the limitations of edge computing I should know before building?
Edge runtimes have meaningful constraints compared to Node.js. No file system access — you cannot read files from disk. No Node.js native modules — anything that uses native bindings (most image processing libraries, crypto with native bindings) does not work. Execution time limits — Cloudflare Workers allows 50ms CPU time on the free plan, 30 seconds on paid. Memory limits — typically 128MB, which constrains what you can load into memory. Cold starts — though usually under 5ms at the edge vs 200-500ms for Node.js serverless. No long-running connections — no WebSockets in most edge runtimes (Cloudflare Durable Objects is the exception). Design your edge functions to be fast, stateless, and lightweight — delegate heavy computation to a traditional serverless function.
Is edge computing free to use for production applications?
Edge computing pricing is generally very affordable for most production applications. Cloudflare Workers: 100,000 requests per day free, then $5/month for 10 million requests. Vercel Edge Middleware: included in all Vercel plans with no additional per-request charge. Deno Deploy: 1 million requests per month free. The economics are more favourable than traditional serverless because edge functions are extremely fast (low CPU time) and the provider operates at massive scale. For a typical SaaS application adding edge middleware for auth and personalisation, the monthly cost increase is often $0 (free tier) or under $5. The cost constraint for edge computing is usually developer time understanding the new model, not the infrastructure bill.