Edge functions run server-side code at data centers close to your users. Learn how they work, how they compare to serverless, and how to choose the right edge platform.

The idea is simple. Move the code to the user instead of making the user wait for the code. Edge functions are server-side functions that execute at whichever of a platform's globally distributed data centers sits closest to the incoming request, rather than at a single origin in one region. The platform handles the routing, runs your code at that location, and returns the response without a trip to a central server.
The reason this matters is physics. Light moves through fiber optic cable at roughly 200,000 km/s, about two thirds of its speed in a vacuum, because the glass has a refractive index near 1.47. Researchers measuring real fiber paths have documented this constraint in detail. A request from Tokyo to a server in Virginia covers around 13,000 km each way, and no amount of application tuning changes that number. Google's performance guidance is blunt about it: you cannot beat physics, and serving content geographically close to users is the most effective way to reduce round-trip time.
That distance shows up in behavior. Research from Think with Google found that 53% of mobile site visits are abandoned if a page takes longer than three seconds to load.
Traditional serverless does not fix this. Serverless removed server management and gave you automatic scaling, which is a real problem solved. But a function deployed to us-east-1 runs in us-east-1 no matter who calls it. Edge functions move the code instead of asking the user to wait.
Every edge platform does two things. It distributes your code to many locations, and it routes each request to the closest one. Where platforms differ is what they run inside those locations.
Isolate-based platforms run your code inside a lightweight sandbox in a shared V8 process, the same isolation model browsers use to separate tabs. There is no container to start and no operating system to boot, so an isolate can be ready in well under a millisecond.
The tradeoff is the runtime. Isolates expose Web Standard APIs such as fetch, Request, Response, and Streams rather than a full Node.js environment. Node compatibility on these platforms has improved, but it remains partial. If your code depends on a native module, a language other than JavaScript or TypeScript, or a framework that assumes a real filesystem, an isolate is the wrong shape.
Container-based edge platforms run a normal process. You write an HTTP server in whatever language you already use, and the platform deploys that container to its edge locations. Nothing about your dependencies, your runtime, or your framework has to change.
Containers are heavier than isolates. That is the honest tradeoff. Platforms mitigate it by keeping containers pre-deployed at the edge rather than starting them per request, which removes the boot cost from the request path without removing the full runtime.
Telnyx Functions takes the container approach and supports JavaScript, TypeScript, Python, Go, and Java through Quarkus. The Edge Compute docs cover the full runtime and configuration model.
Once your code is at multiple locations, the platform's routing layer handles the rest. Anycast or equivalent routing sends each request to the nearest healthy node. You deploy once. The platform decides where each request lands.
Run your code where your users are. Telnyx Functions puts containers on Telnyx-owned edge infrastructure, not rented capacity in someone else's CDN. Explore Telnyx Functions
Both are serverless in the sense that you do not manage servers. They solve different problems, and the differences are concrete enough to put in one place.
| Criteria | Serverless (AWS Lambda) | V8 isolate edge | Container edge (Telnyx Functions) |
|---|---|---|---|
| Where code runs | One AWS region you choose per deployment | Hundreds of PoPs worldwide, request routed to nearest | Telnyx edge locations co-located with carrier PoPs and GPUs |
| Cold start | Roughly 100ms to over 1s depending on runtime and package size | Typically under 1ms, no container to boot | No per-request boot, containers stay deployed at the edge |
| Runtime and languages | Full runtimes for Node.js, Python, Java, Go, Ruby, .NET, plus custom runtimes | JavaScript and TypeScript on Web Standard APIs, partial Node compatibility | Full runtimes for JavaScript, TypeScript, Python, Go, and Java (Quarkus) |
| Execution limits | Hard 15 minute maximum timeout per invocation | Plan dependent. Cloudflare allows 10ms CPU on free and up to 5 minutes on paid | Standard long-running process limits, no isolate CPU ceiling |
| Best for | Batch jobs, queue consumers, long-running backend work | Routing, auth, header rewriting, personalization | Webhook handling, geo-routing, inference-adjacent work, telecom control |
Use regional serverless when the work is long, the data lives in one region anyway, and latency is not the binding constraint. Nightly reports and queue consumers belong in Lambda.
Use isolate-based edge functions when the work is small, stateless, and latency sensitive. Rewriting a header or checking a token is exactly what isolates are for.
Use container-based edge functions when you need proximity to the user and a real runtime at the same time. Anything involving a Python ML library, a Go binary, an existing framework, or a dependency that assumes a filesystem lands here.
Most production architectures combine them. Put the perimeter logic at the edge, keep the heavy asynchronous work in a region, and let each layer do the thing it is good at.
Webhooks are latency sensitive by design. The sender expects a fast acknowledgement, and slow responses trigger retries. Running the receiver at the edge means validation and signing happen near the sender rather than after a transcontinental hop. The Telnyx code examples repository includes edge-compute-webhook-proxy-python, which validates incoming voice and SMS webhooks, adds edge timestamps, HMAC-signs the payload, and forwards it to your backend.
Route callers by where they actually are. US callers get an English agent, LATAM callers get Spanish with localized greetings, and EU callers get a flow that collects explicit recording consent before anything is stored, which is one of the lawful bases for processing under GDPR Article 6. The routing decision happens at the edge node that received the request, so it costs almost nothing. See edge-geo-smart-router-python in the same repository.
Assign variants at the edge and you avoid a client-side flash and an origin round trip. edge-ivr-ab-tester-python splits callers across IVR flows, tracks completion rates per variant, and promotes the winner once results reach statistical significance.
This is where co-location changes the math. A voice agent that has to reach a model in another region pays the network cost on every turn, and conversational quality degrades quickly as that number climbs.
Telnyx puts GPU capacity in the same buildings as its telephony PoPs. When it lit up a GPU PoP in Paris in July 2025, it reported sub-200ms round-trip time for voice AI across Europe, and it reported the same threshold for APAC after deploying GPUs in Sydney that October.
"Latency is the silent killer of Voice AI. Every millisecond counts. By colocating our GPU inference with our private backbone in Paris, we're redefining what 'real time' means for European businesses."Ian Reither, COO of Telnyx
Read that number the way it is scoped. Sub-200ms is reported for regions where a GPU PoP and the telephony PoP share a facility, not as a global average. That scoping is the useful part, because it tells you what to ask any edge inference vendor: which locations, and how far is the model from the network. Pair the co-location with Voice AI and the model, the media path, and your business logic all stay inside one network.
The same architecture runs open-source models, so you can point a function at a new model the week it releases and compare it against your current one on your own traffic, rather than waiting for a vendor's release cycle to reach you.
Rejecting a bad request at the edge is cheaper than rejecting it at the origin, and it keeps abusive traffic off your backend entirely. Token validation, quota checks, and IP reputation all work well as edge functions because the decision needs no origin state beyond a fast KV lookup.
Work through these questions in order.
Cloudflare Workers pioneered isolate-based edge compute and has the largest footprint of the group. Cloudflare's published network footprint lists data centers in more than 330 cities across over 125 countries. It is excellent at what it does. The constraint is the runtime, which is JavaScript and TypeScript on Web Standard APIs with partial Node compatibility.
Vercel Edge Functions offered strong developer experience for teams already in the Next.js ecosystem. Vercel has since deprecated standalone Edge Functions for new projects and points teams toward Vercel Functions with the Node.js runtime and Fluid compute, which effectively retires the constrained-runtime approach for new projects.
Deno Deploy is TypeScript-first and has added native npm support, which widened what you can import considerably. It remains a JavaScript-runtime platform.
Telnyx Functions is the container option, and the difference is what sits underneath. Telnyx holds carrier licenses in more than 30 countries and runs its own private backbone, its own PoPs, and GPU capacity placed alongside them. A function can sit next to the model it calls and next to the Voice API controlling the call it is reasoning about, on one network, on one bill.
Telnyx started at Layer 0 with carrier licenses and a private backbone, then added GPU capacity at the edge on top of it. Most platforms in this category start at the application layer and rent everything below it.
Owning the full network, from the PSTN through to inference, is the reason edge compute and telecom belong together. Voice AI is the workload where latency is not a metric on a dashboard, it is the product. A pause the caller can hear is a failed conversation. Controlling every hop is what makes the budget for that pause big enough to work with.
The workflow is deliberately short. Scaffold a function, write a server, ship it, get a URL.
The shape of the flow is what matters here. Check the Functions quickstart for the current CLI syntax, required flags, and authentication step before you run anything. You get a public URL with automatic TLS and distribution across Telnyx edge locations, plus configuration for KV namespaces and storage.
What are edge functions? Edge functions are server-side functions that run at data centers distributed globally instead of in one central region. Each request is routed to the nearest location and executed there, which cuts the network round trip for users far from a traditional origin server.
How do edge functions work? The platform replicates your code across many edge locations. When a request arrives, routing sends it to the closest healthy node, the function executes there, and the response returns from that node. Platforms run this code either in V8 isolates or in containers.
What is the difference between edge functions and serverless functions? Both remove server management. Serverless functions run in a single cloud region and can execute for up to 15 minutes on Lambda. Edge functions run in many locations at once and are optimized for short, latency-sensitive work close to the user.
Are edge functions faster than AWS Lambda? For a globally distributed audience, usually yes, because the network distance is shorter and cold starts are lower. For long-running or compute-heavy jobs where the data already lives in one region, Lambda is often the better fit.
Can edge functions run Python or Go? On isolate-based platforms, no. Those run JavaScript and TypeScript. On container-based platforms like Telnyx Functions, yes. Telnyx supports JavaScript, TypeScript, Python, Go, and Java through Quarkus.
Edge functions remove the distance between your code and your users. Telnyx removes the distance between your code, your storage, your models, and your phone network, because all of it runs on infrastructure Telnyx owns.
Write a server in the language you already use, run telnyx-edge ship, and get a public URL served from the same network that carries the calls.
Explore Telnyx Functions or read the Edge Compute docs to get started.
Related articles