Browse Chapters

Cloud Functions and Edge Functions

The terms cloud functions and edge functions occasionally arise when talking about serverless applications. For example, Netlify uses these terms in its documentation. The distinction between these “cloud” and “edge” serverless functions does not concern the functions themselves but rather where the specific function is being executed.

  • A cloud function executes “in the cloud,” which usually means at one of the main hyperscalers such as AWS, Azure, or Google Cloud.
  • An edge function executes on the edge, a concept we will cover more later. In a nutshell, “edge” refers to the proximity between the end user and the function which they are calling. The term edge also refers to the proximity of the function being executed and the data being processed. The ultimate goal is to obtain the most efficient round-trip between the user, the function and any data being processed.

Providers like Vercel and Netlify must make this distinction because the APIs they provide for the functions that run in the cloud are different from the APIs they provide for the functions that they run in edge providers like CloudFlare. This is an implementation-specific API difference that bubbles up to the developer.

Our view is that “edge functions” and “cloud functions” are varieties of serverless apps. Keep in mind, when we talk about cloud and edge computing later on that the term edge is niche and only relates to a subset of service providers.

Browse Chapters

Quickstart Your Serveless Apps with Spin

Get Started