PostgreSQL vs Redis for Solo Developers
Comparing PostgreSQL and Redis for solo developers. Features, pricing, and which to pick.
Quick Comparison
| Feature | PostgreSQL | Redis |
|---|---|---|
| Type | Relational database (on-disk, ACID) | In-memory data store (key-value) |
| Latest stable | 18.4 (18.0 shipped Sept 25, 2025) | 8.8.0 (May 25, 2026) |
| License | PostgreSQL License (permissive, OSI-approved) | Tri-license since 8.0: RSALv2, SSPLv1, or AGPLv3 |
| Self-host pricing | Free, open source | Free, open source under AGPLv3 |
| Managed cloud entry | From free (Supabase 500MB, Neon 0.5GB) | Redis Cloud free 30MB, Essentials from $5/mo |
| GitHub stars (source mirror) | 21,021 (postgres/postgres) | 74,580 (redis/redis) |
| Node client npm weekly downloads | 29.3M (pg) | 18.4M (ioredis) + 9.8M (node-redis) |
| Learning Curve | Moderate | Easy |
| Best For | Production apps needing reliability and advanced querying | Caching, sessions, queues, and real-time features |
| Solo Dev Rating | 9/10 | 8/10 |
PostgreSQL Overview
PostgreSQL is the relational database I reach for on every production project. It handles structured data with rock-solid reliability, supports JSONB for flexible documents, has built-in full-text search, and an extension ecosystem that covers everything from geospatial queries to time-series data. You get the power of five different databases in one.
For a solo developer, Postgres is the foundation you build everything on. It stores your users, orders, content, analytics, and anything else that needs to persist reliably. Every modern hosting platform (Supabase, Neon, Railway, Render) offers managed Postgres, so you never have to worry about backups or replication yourself.
The learning curve is moderate, but the investment pays off fast. Once you understand indexes, JSONB, and basic query optimization, you can build applications that scale well beyond what a solo developer typically needs.
Redis Overview
Redis is not a traditional database. It is an in-memory data store that operates at sub-millisecond speed. Think of it as a Swiss Army knife for caching, session storage, message queues, rate limiting, and real-time features like leaderboards or pub/sub messaging.
I use Redis alongside my primary database in every project that grows beyond a simple CRUD app. It handles the things that need to be fast: caching expensive database queries, storing user sessions, managing background job queues with Celery or BullMQ, and rate-limiting API endpoints.
Redis is simple to learn. The data structures (strings, hashes, lists, sets, sorted sets) map naturally to common problems. You can have it running locally in minutes and start seeing performance improvements immediately.
Key Differences
These tools solve fundamentally different problems. PostgreSQL is your system of record, the source of truth for all persistent data. Redis is your speed layer, handling the things that need to happen in microseconds. Comparing them head-to-head misses the point because most production systems use both.
Persistence vs. speed. PostgreSQL writes to disk with full ACID guarantees. Your data survives crashes, power failures, and server restarts. Redis stores everything in memory. While it does support persistence (RDB snapshots and AOF logs), it is designed primarily for speed, not durability. If Redis loses data, you regenerate it from your primary database.
Data modeling is completely different. Postgres uses tables, rows, columns, foreign keys, and SQL queries. Redis uses key-value pairs with specialized data structures. You do not query Redis the way you query Postgres. You design your Redis keys around access patterns, not relationships.
Cost at scale. PostgreSQL stores data on disk, so storage is cheap. Redis stores everything in RAM, which is expensive. A 100GB Postgres database costs pennies. A 100GB Redis instance costs serious money. For a solo developer, this matters when your cached data grows.
The license situation. Redis moved off the permissive BSD license in March 2024 to a dual SSPL plus RSALv2 model, which is why the Linux Foundation backed the Valkey fork (continuing from Redis 7.2.4). Then on May 1, 2025, with Redis 8.0, the project added AGPLv3 back as a third option, so current Redis ships under a tri-license of RSALv2, SSPLv1, or AGPLv3. AGPLv3 is OSI-approved, but it is copyleft, so if you embed Redis into something you distribute or offer as a service, read the terms. PostgreSQL stays under its own permissive PostgreSQL License with no corporate owner. Something to keep in mind for long-term projects.
When to Choose PostgreSQL
- You need a primary database for your application
- You want ACID-compliant, durable data storage
- You need complex queries, joins, and aggregations
- You are building a CRUD application with relational data
- You want one database that handles structured and semi-structured data
When to Choose Redis
- You need caching to speed up slow database queries
- You want fast session storage for authenticated users
- You need a message queue for background jobs (Celery, Sidekiq, BullMQ)
- You are building real-time features like leaderboards or pub/sub
- You need rate limiting on API endpoints
By the Numbers (2026)
The headline specs as of late May 2026, pulled from the official release pages and package registries:
Versions and cadence. PostgreSQL's current major line is 18, with 18.0 released on September 25, 2025 and 18.4 the latest minor as of May 14, 2026. Postgres ships minor releases at least once every three months. Redis is on 8.8.0, released May 25, 2026, with the 8.x line being the one that restored an open source license. The Linux Foundation's Valkey fork is on 9.1.0.
Adoption and reach. The Redis source mirror on GitHub carries 74,580 stars, while the Postgres source mirror sits at 21,021 (the Postgres number understates real footprint, because most contribution and discussion happens on the project's own mailing-list infrastructure rather than GitHub). Valkey has already pulled 25,936 stars in roughly two years.
Client library pull, last 7 days (npm). This is a useful proxy for how much each tool actually runs in production Node apps. The pg Postgres driver saw 29,260,035 weekly downloads. On the Redis side, ioredis saw 18,361,400 and the official redis (node-redis) client saw 9,790,245, so roughly 28M combined Redis-client pulls against 29M Postgres-driver pulls. Both are deep in the ecosystem; this is not a niche-versus-mainstream matchup.
Licensing. PostgreSQL is under the permissive PostgreSQL License. Redis 8 and later is tri-licensed under RSALv2, SSPLv1, or AGPLv3 after the 2024 SSPL move and the May 2025 AGPLv3 re-addition.
Real Cost at Solo-Dev Scale
The self-hosted answer is simple: both are free. PostgreSQL is free under its own license, and Redis 8 is free under AGPLv3 if you self-host. The cost difference only shows up when you reach for managed hosting, which most solo devs do to skip backups and replication.
Take a realistic small-app workload: a database under 500MB and a cache or session store under 250MB. Here is what that actually costs per month at published 2026 rates.
Primary database (PostgreSQL, managed).
- Supabase Free covers 500MB of database storage and 50,000 monthly active users at $0/month, though free projects pause after a week of inactivity. Supabase Pro is $25/month and lifts you to 8GB and an always-on instance.
- Neon Free gives you 0.5GB of storage and 100 compute-hours per project per month at $0/month. Its Launch plan bills usage at $0.35 per GB-month of storage and $0.106 per compute-hour with a $5/month minimum, so a tiny always-on Postgres lands near that $5 floor.
Speed layer (Redis, managed).
- Redis Cloud Free covers a single 30MB database at $0/month, which is enough for sessions and light caching on a brand-new app.
- Redis Cloud Essentials starts at $5/month (billed at $0.007/hour). The 250MB Essentials tier (256 concurrent connections, 1,000 ops/sec) is the typical first paid step once 30MB gets tight; check current pricing for the exact dollar figure on each size since Redis publishes those only through its calculator.
Worked monthly total for the stated workload:
- Day one, growing project: Supabase or Neon free tier plus Redis Cloud free 30MB equals $0/month.
- Once you outgrow free and want always-on, no-pause infrastructure: roughly $25/month for Supabase Pro (or about $5/month on Neon Launch at low usage) plus from $5/month for Redis Cloud Essentials, so call it $10 to $30/month total depending on which Postgres host you pick.
The structural point holds at every tier. Postgres stores on disk, so capacity is cheap and the managed free tiers are generous. Redis stores in RAM, so paid steps arrive sooner as your cached dataset grows. Start on the free pair, and add a paid Redis tier only when 30MB of cache genuinely runs out.
The Verdict
This is not an either/or decision. PostgreSQL is your primary database. Redis is your performance layer. For a solo developer starting out, begin with just PostgreSQL. It handles everything for small to medium applications without any additional complexity.
When your app grows and you need caching, background jobs, or real-time features, add Redis. The combination of Postgres plus Redis is one of the most battle-tested architectures in production software. I run this exact pair on every project I build, and it handles everything I throw at it. Start with Postgres, add Redis when you feel the pain, and you will have a stack that scales with you.
Sources
All figures verified on 2026-05-29.
- PostgreSQL 18 release announcement (18.0, Sept 25, 2025): https://www.postgresql.org/about/news/postgresql-18-released-3142/
- PostgreSQL versioning and minor-release cadence: https://www.postgresql.org/support/versioning/
- PostgreSQL source mirror, GitHub stars (21,021): https://github.com/postgres/postgres
- Redis source repository, GitHub stars (74,580): https://github.com/redis/redis
- Redis 8.8.0 release (May 25, 2026): https://github.com/redis/redis/releases/tag/8.8.0
- Valkey source repository, GitHub stars (25,936): https://github.com/valkey-io/valkey
- pg npm weekly downloads (29,260,035): https://api.npmjs.org/downloads/point/last-week/pg
- ioredis npm weekly downloads (18,361,400): https://api.npmjs.org/downloads/point/last-week/ioredis
- node-redis npm weekly downloads (9,790,245): https://api.npmjs.org/downloads/point/last-week/redis
- Redis AGPLv3 licensing announcement (May 1, 2025): https://redis.io/blog/agplv3/
- Redis Cloud pricing, Essentials from $5/month and free 30MB tier: https://redis.io/pricing/
- Redis Cloud Essentials plan tiers and limits: https://redis.io/docs/latest/operate/rc/subscriptions/view-essentials-subscription/essentials-plan-details/
- Supabase pricing (Free 500MB, Pro $25/month): https://supabase.com/pricing
- Neon pricing (Free 0.5GB, Launch $0.35/GB-month storage, $0.106/CU-hour, $5/month minimum): https://neon.com/pricing
Like this? You'll like what I'm building too.
Two ways to support and get more of this work.
HEARTH
A privacy-first Life OS for your desktop. Journal, tasks, and notes that stay on your machine. Coming soon, direct download from this site.
Read moreMY TOOLKITS
Receipts-first toolkits for shipping after hours, building Claude agents, publishing on Amazon, and more. The exact methods I used, not theory.
Browse on WhopRelated Articles
Angular vs HTMX for Solo Developers
Comparing Angular and HTMX for solo developers. Features, pricing, pros and cons, and which one to pick for your next project.
Angular vs Qwik for Solo Developers
Comparing Angular and Qwik for solo developers. Features, pricing, pros and cons, and which one to pick for your next project.
Angular vs SolidJS for Solo Developers
Comparing Angular and SolidJS for solo developers. Features, pricing, pros and cons, and which one to pick for your next project.