11ty build vs. serverless vs. edge

Zach explains the difference of build, serverless, and edge for 11ty rendering modes. The video is taken from ELEVENTY: BUILD VS. SERVERLESS VS. EDGE where Zach´s slidedeck is also available.

11ty is a build-first, static-first tool – serverless and edge are to supplement the build of 11ty. Static-first should keep everything as fast and as portable as possible for 11ty.

Netlify Edge Functions are built on Deno, an open source, standards-based runtime, which means it works out-of-the-box with web frameworks that support these capabilities. Deno does not use Node modules, or support Node APIs, but instead can load modules directly from URLs.

Edge functions differ from serverless functions in the following way:

Edge Functions allow you to serve content from the CDN server closest to the user. The region closest to the request will run the function. The immediate benefits that are associated with Edge Functions include, but are not limited to:
  • Decreased latency: Running logic closer to the end user can reduce not only the volume of data, but the distance that data needs to travel. If a user were sending a request in Arizona, a response time from a local node would be lower than one in London.
  • Reduction in cold start boot times: For serverless functions, cold start boot times average anywhere from 50-500ms. Take into consideration, research shows that the new standard for 2022 for the time an online shopper will wait for your page to load is 2-3 seconds. The cold start average for Edge functions, on the other hand, is drastically reduced (50-200ms).