DEV Community

Alex Spinov
Alex Spinov

Posted on

Neon Has a Free Serverless PostgreSQL — Scale to Zero and Pay Nothing When Idle

A side project needed PostgreSQL. RDS costs $15/month minimum, even when nobody uses the app. Supabase free tier has limits. The database should sleep when the app sleeps.

Neon is serverless PostgreSQL that scales to zero. When your app has no traffic, the database hibernates. You pay nothing. When traffic comes, it wakes up in milliseconds.

What Neon Offers for Free

  • 0.5 GiB Storage - Per project
  • Autoscaling - Scale compute up and down automatically
  • Scale to Zero - No cost when idle
  • Branching - Git-like database branches for dev/preview
  • Connection Pooling - Built-in pgbouncer
  • Point-in-Time Recovery - 7 days of history
  • Postgres 16 - Latest PostgreSQL version

Quick Start

# Use standard PostgreSQL connection string
psql "postgres://user:pass@ep-cool-name.us-east-2.aws.neon.tech/dbname"
Enter fullscreen mode Exit fullscreen mode
import { neon } from '@neondatabase/serverless'
const sql = neon(process.env.DATABASE_URL)
const posts = await sql`SELECT * FROM posts ORDER BY created_at DESC`
Enter fullscreen mode Exit fullscreen mode

Website: neon.tech - Free tier with scale to zero


Need to monitor and scrape data from multiple web services automatically? I build custom scraping solutions. Check out my web scraping toolkit or email me at spinov001@gmail.com for a tailored solution.

Top comments (0)