Skip to content

SYSTEM Cited by 1 source

Netlify Edge Functions

Netlify Edge Functions are Netlify's Deno-based serverless runtime. Execute JavaScript / TypeScript at Netlify's global edge network, close to the user. Like other edge runtimes, user code runs inside a sandboxed environment where only HTTP egress via fetch() is available — raw TCP / UDP sockets are not reachable from the sandbox by default.

Why it shows up on this wiki

Third named launch target of the PlanetScale serverless driver for JavaScript: "The ability to store and query data in PlanetScale from environments such as Cloudflare Workers, Vercel Edge Functions, and Netlify Edge Functions." (Source: sources/2026-04-21-planetscale-introducing-the-planetscale-serverless-driver-for-javascript.)

Together with systems/cloudflare-workers and systems/vercel-edge-functions, Netlify Edge Functions is a first-class instance of the concepts/serverless-tcp-socket-restriction constraint — and one of the motivating consumers for the patterns/http-api-alongside-binary-protocol pattern.

Key properties

  • Runtime: Deno — TypeScript / JS runtime with a web-platform API surface (fetch, Request, Response, Web Streams). Not Node.js, not V8 isolates — different lineage than Cloudflare Workers and Vercel Edge.
  • Egress: HTTPS via fetch() only.
  • Deployment: Netlify's global edge network; runs at the POP nearest the user.
  • Use case: middleware for Netlify-hosted sites; API routes under netlify/edge-functions/*.ts.

Integration with PlanetScale serverless driver

// netlify/edge-functions/hello.ts
import { connect } from "https://esm.sh/@planetscale/database@^1";

export default async () => {
  const conn = connect({
    host: Netlify.env.get('DATABASE_HOST'),
    username: Netlify.env.get('DATABASE_USERNAME'),
    password: Netlify.env.get('DATABASE_PASSWORD'),
  });
  const results = await conn.execute('SELECT * FROM users LIMIT 10');
  return new Response(JSON.stringify(results.rows), {
    headers: { 'content-type': 'application/json' },
  });
};

The driver's Fetch-API dependency is what lets it run on Deno-based runtimes like this one without any runtime adaptation.

Seen in

Last updated · 378 distilled / 1,213 read