Netlify’s Edge Handlers Bring Custom Code to JAMStack at the Edge
While the websites and web applications produced using JAMstack are not entirely static, there are some limitations in their functionality, and Netlify, the primary company behind the creation of JAMstack some years ago, is working to address those limitations with the introduction of Edge Handlers. Already, Netlify offered serverless functions as a way to add some amount of backend processing and functionality, and now the company is adding Edge Handlers to the mix as a way to enable fast, personalized content in websites and web apps by executing custom code at the network edge.
Introduced this week at Netlify’s Jamstack Conf Virtual, Edge Handlers are available to select customers in preview and are intended to more easily deliver localized content, simplify A/B testing, and offer custom authentication, among other features that might otherwise be difficult using JAMstack. Netlify will provide detailed logs for Edge Handlers within the Netlify UI, allowing users to use their existing tooling, and soon plans to provide location testing and validation before shipping to production. Edge Handlers, said Biilmann, differ from serverless functions in their speed.
“In an Edge Handler, you want routing decisions, authentication decisions, personalization, response transformations, and in general, you want to write the kind of code that can take very quick decisions and run within milliseconds,” said Biilmann.
According to Biilimann, the release will be accompanied by the release of background functions at this week’s conference, joining the company’s existing serverless offering, to provide three ways to extend JAMstack functionality with three different use cases.
“We will be introducing a third kind of functions, background functions, which are for really long-running tasks. Let’s say you have a function that allows someone to subscribe to your service, that makes a call to Stripe and creates you as a subscriber. After you do that, you might want to take that email address and run some background processes. Those are all the things you might want to do in a background function that can run for even minutes,” said Biilmann. “I tend to see it in these three layers: edge handlers for things where you can do it in milliseconds and it typically involves quick routing decisions, authentication decisions, or response transformations, serverless functions for things that are more like microservices, API endpoints, and things like that, and then background functions for long-running tasks where you just want to start the task and then the user can go their own way.”
Interested users can request early access to Edge Handlers, though Biilmann declined to say when the feature would be generally available.
Feature image by skeeze from Pixabay.