Edge computing
ej kum-PYOO-ting
Running code on servers located close to users around the world instead of in a single data center.
Edge computing means running your code on servers distributed across many locations worldwide, as close to your users as possible. Instead of all requests traveling to a data center in Virginia, a user in Tokyo hits a server in Tokyo. A user in London hits a server in London. The result: faster response times because data travels shorter distances.
Cloudflare Workers, Vercel Edge Functions, and Deno Deploy are popular edge computing platforms. They deploy your code to 200+ locations around the world. When a request comes in, it is handled by the nearest server. For a global application, this can cut response times from 200ms to 20ms. That difference is visible to users and measurable in conversion rates.
Edge computing has trade-offs. Your code runs in a limited environment: no file system access, restricted CPU time, smaller memory limits. Database connections are harder because your database is still in one location. Edge computing works best for request routing, authentication checks, A/B testing, content personalization, and serving cached data. Compute-heavy operations still belong in traditional servers or serverless functions.
Examples
A company reduces global latency with edge functions.
The marketing site is built with Next.js and deployed to Vercel. All pages are rendered at the edge. A visitor in Sydney loads the page in 40ms instead of 250ms. Bounce rates in Asia-Pacific drop by 15%. The team did not change any code. They changed where the code runs.
An authentication check runs at the edge.
Every API request must validate a JWT token before reaching the backend. The team moves token validation to Cloudflare Workers. The edge function checks the token signature, verifies expiration, and either forwards the request to the origin server or returns a 401. Invalid requests never reach the backend. The origin server's load drops by 30% because bot traffic and expired tokens are filtered at the edge.
A team uses edge computing for content personalization.
The e-commerce site shows different pricing for different regions. Instead of the frontend making an API call to determine the user's region, an edge function reads the user's location from the request headers, injects the correct currency and prices into the HTML, and serves the personalized page in under 50ms. No client-side JavaScript needed. No layout shift. The page arrives ready to buy.
In practice
Read more on the blog
Frequently asked questions
What is the difference between edge computing and CDN?
A CDN caches and serves static files (images, CSS, JavaScript) from locations near users. Edge computing runs your code at those locations. A CDN serves a cached copy of your homepage image. An edge function generates a personalized version of that homepage based on the user's location, language, and login status. CDNs serve content. Edge computing runs logic.
When should you not use edge computing?
When your code needs a database connection, heavy computation, or large dependencies. Edge functions have strict limits: typically 50ms CPU time, 128MB memory, and no persistent connections. A function that queries PostgreSQL from the edge adds latency because the database is still in one region. Use edge computing for lightweight logic (auth checks, redirects, header manipulation, cached responses) and traditional servers for database-heavy operations.
Related terms
Content delivery network: a global network of servers that caches and serves content from locations close to users.
The time delay between a request being sent and a response being received.
A cloud model where the provider manages all infrastructure and you only pay for actual execution time.
On-demand computing infrastructure (servers, storage, networking) provided by a third party.
Storing a copy of data in a faster location so repeated requests do not hit the slower original source.

Want the complete playbook?
Picks and Shovels is the definitive guide to developer marketing. Amazon #1 bestseller with practical strategies from 30 years of marketing to developers.