This set builds vocabulary for lightweight, geographically distributed server-side compute.
0 / 5 completed
1 / 5
At standup, a dev mentions running a small piece of server-side logic at a location geographically close to the requesting user, rather than in one centralized data center. What is this called?
An edge function executes server-side logic at a location geographically close to the requesting user, reducing latency compared to routing every request to one centralized data center. Platforms like Netlify distribute these functions across many edge locations automatically. This pattern suits latency-sensitive tasks like personalization or request rewriting performed close to the user.
2 / 5
During a design review, the team wants to rewrite an incoming request's URL or headers before it reaches the origin server, based on the visitor's location. Which use case does this represent?
Edge functions commonly handle request or response manipulation, such as rewriting a URL or setting headers based on the visitor's detected location, before the request reaches the origin server or is returned to the client. Performing this close to the user avoids an extra round trip to a centralized server just for this lightweight logic. This is one of the most common practical use cases for edge compute.
3 / 5
In a code review, a dev notices an edge function has a much smaller resource and execution-time budget compared to a traditional serverless function. What tradeoff does this reflect?
Edge functions are designed for very fast, lightweight execution distributed across many locations, which typically comes with a smaller resource and execution-time budget compared to a traditional centralized serverless function optimized for heavier workloads. Choosing between them depends on matching the task's complexity to the right execution model. Offloading a heavy computation to an edge function that isn't designed for it can hit these limits quickly.
4 / 5
An incident report shows an edge function attempted a long-running database query and timed out, causing failed requests. What design lesson does this illustrate?
Because edge functions are optimized for fast, lightweight execution, attempting a long-running operation like a heavy database query risks hitting execution timeouts designed to keep edge compute responsive. Heavier backend logic is often better suited to a traditional serverless function or origin server instead. This is a common architectural lesson when a team first adopts edge compute for tasks beyond simple request manipulation.
5 / 5
During a PR review, a teammate asks how an edge function differs from a traditional serverless function running in a single region. What is the key distinction?
A traditional serverless function typically executes in a single centralized region, while an edge function is distributed and runs from a location close to the requesting user, reducing latency for geographically distributed traffic. This distribution is well suited to lightweight, latency-sensitive logic, while heavier processing often still belongs in a centralized function or origin server. The choice between them depends on the specific latency and resource requirements of the task.