2 ms·
It’s good to understand all of the things Postgres can do. It’s a powerful database. A counterpoint is that the barrier to using redis is tiny and in exchange
by tyre 2y ago
It’s good to understand all of the things Postgres can do. It’s a powerful database.
A counterpoint is that the barrier to using redis is tiny and in exchange you have a very high performing system that has extensive library support and takes load from your primary database.
If you want to cache API responses, for example, could you do that in Postgres? Sure. And you could support things like TTLs with cron jobs sweeping stale cache values. Or you can just use redis.
Advisory locks are cool and useful. They can be a little problematic you want something like PGBouncer and you’re stuck between session advisory locks and transaction interleaving.
Having separate systems has downsides (network calls, availability, domain knowledge), but the tradeoffs with Redis of all things are pretty low.
- asah 2y agoIt's one less thing to manage in production. Start with postgresql then add niche systems for performance, scaling, cost.