05/08/24

Introducing: Neon Serverless Postgres in Encore

We've added full support for Neon's dynamic scaling and branching capabilities.

3 Min Read

It's Day 3 of Launch Week and today we've got a good one...

Encore now supports using Neon as a database provider for all your environments, including those in your cloud on AWS and GCP. This means you can connect your Neon account to use highly scalable serverless Postgres for all your Encore managed environments, in the same seamless way you’re already using Encore to orchestrate your Cloud SQL and RDS databases.

Neon is a great complement to the existing supported databases, as it both scales up dynamically to handle peak hours, and scales to zero with cold storage offloads to S3 for cost efficiency.

Database Branching makes Encore's Preview Environments even more powerful

One of Neon’s key features is branching, and Encore’s new Neon integration fully supports this.

A branch is a copy-on-write clone that you can create from your production or test data at any specific point in time. It's independent, so you can experiment, modify, or delete it without affecting the original data.

If you use Neon for your production or testing database, you can now configure Encore’s built-in ephemeral Preview Environments to automatically branch off this database, seeding your Preview Environment with real-world data to simplify testing.

Embracing Serverless for a Greener Future

At Encore, we're passionate about serverless technology. It minimizes idle compute, benefiting both the environment and (in most cases) your budget. While cold start times can pose challenges, the overall advantages outweigh them for many use cases.

Our free development hosting solution, Encore Cloud, currently hosts many thousands of low-traffic environments, all powered by serverless compute. However, our databases were a different story...

From Kubernetes to Serverless Databases: A Cost-Effective Evolution

Previously, we relied on a self-managed Kubernetes cluster for databases, incurring costs for the cluster itself and 24/7 database operation despite minimal usage. As Encore Cloud grew, managing this infrastructure became increasingly burdensome. We needed a change, a serverless solution for our databases.

Neon: The Perfect Harmony

We found Neon to be the ideal candidate, and after successful testing and integration with our provisioning system, we migrated several test environments. The smooth transition gave us the confidence to decommission our Kubernetes cluster, resulting in significant cost savings and eliminating the management overhead.

The best part? This shift was virtually transparent to our users, with the only noticeable change being on the infrastructure page.

A Powerful Partnership for Enhanced Workflows

After months of refinement, our Neon integration is now robust and seamless, providing the full combined power of Encore Cloud and Neon. With Neon's branching capabilities integrated with Encore's Preview Environments, we've implemented deep product integrations to further simplify your development and testing workflows.

We're excited to see how this partnership empowers your projects and helps you be creative and productive!

Try it yourself

Want to give it a spin?

macOS
Windows
Linux
Brew
$ brew install encoredev/tap/encore

If you have any questions or just want to hang out with other developers, join our community on Discord.

Bonus Track: Roles Reimagined

As part of this transition, we also took the opportunity to completely rethink our Postgres role provisioning for your databases. When you provision a database in Neon, you'll notice many new roles permissions in place.

We'll follow up soon with a dedicated article on how you can utilize these new roles to improve the security of your Encore applications. — Stay tuned by signing up for our newsletter below!

Encore

This blog is presented by Encore, the Development Platform for startups building event-driven and distributed systems.

Like this article?
Get future ones straight to your mailbox.

You can unsubscribe at any time.