11489 shaares
417 private links
417 private links
Why? Costs, operational complexity, data consistency
- Caching with UNLOGGED table (that I've also found in other posts)
- Pub/Sub with LISTEN/NOTIFY
- Job Queues with SKIP LOCKED
- Rate Limiting is also possible
- Sessions with JSONB
PostgresSQL ist nearly 2 times slower compared to Redis, but is it worth it?
When to keep Redis?
- extreme performance needed
- using redis-specific data structures
Migration strategy:
- Side by side
- Read from Postgres
- Write to Postgres only
- Remove Redis
and Prisma provide for example typedSQL to have a smooth integration with Typescript.