Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Neon 4 min read Announcement easyNovice

Bring Your Own Extensions to Serverless PostgreSQL

Neon now supports private and custom Postgres extensions in its serverless platform via Dynamic Extension Loading, available in beta on request. Extensions are built in a separate repository and stored in S3, configured per user in the control plane. Compute instances download control files at startup and fetch library files lazily when extension functions are first called, so extensions can be added without restarting compute. Neon plans to move default extensions into this storage too, shrinking the compute image and speeding up cold starts while reducing the attack surface in a multi-tenant environment.

Related posts

  • SELECT ’Hello, World’

    Neon easyNovice

    Neon is a serverless Postgres service built on separated storage and compute, launching behind a waitlist. Each user gets a containerized Postgres compute node, while data lives in a multi-tenant Rust storage layer: Safekeepers run a consensus protocol and, together with S3, form the system of record, and Pageservers serve pages with low latency as disposable scratch space. Avoiding EBS in favour of local disk for hot data and S3 for cold data cuts the cost of triple-replicated storage and compute. Stateless compute also enables scale-to-zero, roughly 3-second provisioning, and copy-on-write database branching for CI/CD workflows, all released under Apache 2.0.

  • Simplify Serverless in AWS: How to Use Neon and Ephemeral Environments

    Neon mediumAdept

    Neon's serverless Postgres pairs well with ephemeral environments on AWS Lambda because each environment can get its own instant copy-on-write database branch without paying for extra RDS uptime. Compared with Aurora Serverless v2, Neon claims ~500ms cold starts versus 15s, built-in PgBouncer supporting 10,000 connections, and an HTTP/WebSocket data API. A TODO API built with the Serverless Framework shows how the serverless driver's sql template tag guards against SQL injection, but only when called directly on a string literal, and how sql.query with $n placeholders handles dynamic updates. Scripts and GitHub Actions create a branch per feature or CI run, run unit and end-to-end tests against it, then tear down both the stack and the branch.

  • Understanding Neon’s object hierarchy

    Neon easyNovice

    Neon organizes serverless Postgres into projects, branches and compute endpoints, built on a separation of storage and compute that avoids sizing a database upfront. A project is a container per application holding a Postgres cluster (default database "neondb"); branches are copy-on-write, isolated copies of data from the current or a past point in time, with the default cluster represented by the "main" branch. Each branch is reached through a compute endpoint that can be fixed-size or autoscale between a minimum and maximum, letting you cap worst-case spend; at time of writing each branch supports only one endpoint, with read replicas planned to allow more.

  • Scaling serverless Postgres: How we implement autoscaling

    Neon mediumAdept

    Neon autoscales serverless Postgres by running each compute endpoint in a QEMU/KVM VM on Kubernetes (via its NeonVM controller) and hot-adding or removing CPU and memory based on load average. A per-node autoscaler-agent makes scaling decisions but must get every upscale approved by a modified Kubernetes scheduler plugin, which acts as the single source of truth to prevent memory overcommit. Post-copy live migration (~100ms pauses) moves VMs off full nodes, kept cheap by separated storage. Inside each VM, a vm-informant uses cgroup memory.high notifications to freeze Postgres briefly (up to 20ms) while requesting more memory, and resizes a tmpfs-backed local file cache with 1MB LRU chunks that gave one user a 4x speedup.

  • Make Yourself at Home with Neon Local

    Neon mediumAdept

    Neon Local is a Docker-based proxy that exposes a local Postgres endpoint for a Neon cloud database. By default it creates a fresh database branch when the container starts and deletes it when the container stops, giving isolated ephemeral environments for local development and CI without a local Postgres instance or environment drift. Configuration happens through environment variables: DRIVER selects the serverless or standard Postgres client, PARENT_BRANCH_ID picks the base branch, and DELETE_BRANCH=false keeps the branch between runs. Example docker-compose and docker run setups show how to point the Neon serverless driver at the proxy. Named branches and an offline dump/restore mode are planned.

The quest for software engineering knowledge.

Look:
Layout: