logoalt Hacker News

dpc10today at 4:05 PM7 repliesview on HN

I love Postgres, and I agree with the general sentiment. But I read the (growing) genre of "use Postgres for everything" articles and they imply a difficulty in running other software that I just don't see.

I'm thinking of Redis in particular. If you're using it as incredibly fast but not critical storage, it's trivial to set up and it ~never crashes or requires maintenance. It creates no headaches, and in exchange gives me a k/v store that I can thrash without worrying about performance (I know it's fast), downstream impact (am I slowing down critical-path SQL queries), etc. Especially in the age of LLMs, which I've found to be great at devops-type tasks, I feel slightly less compelled to simplify my stack.


Replies

gentlewatertoday at 5:26 PM

Only problem for me vs using your primary DB is that Redis has no redundancy unless you run it in cluster mode. For us that means when the kubernetes node restarts, availability degrades. Could of course enable clustering, but at that point it isn’t dead simple anymore. And using the DB is.

show 1 reply
dinklebergtoday at 4:20 PM

Yeah I've found this quite odd. Even the LLMs want to pressure you to not use Redis and go all in on Postgres. Postgres is great, and I usually use it. But Redis is so trivial to add to your stack and it does what it does really well. Why not use the right tool for the job?

show 3 replies
alex_smarttoday at 5:26 PM

The problem only arises when you have to worry about persistent state. As soon as you have to worry about that, you have to think about backups, replicas, disaster recovery drills and so on. It is much easier to solve for that can of worms for one system than three.

Xeoncrosstoday at 4:14 PM

Redis really is a great piece of software. Low memory, high-performance, feature-rich, and stable. Really hard to beat it for places where you want a durable cache even if technically you can use something else.

deepsuntoday at 4:45 PM

And Redis has auto-delete rows (aka TTL). In Postgres you need a cron job to clear stale rows.

show 1 reply
stavrostoday at 4:17 PM

Oh no, redis is super simple to set up and use. It's just that setting it up is not as simple as not setting it up.

show 2 replies
b-mantoday at 6:04 PM

I think your post misses the point of the DBMS centralization: managed consistency.

It is not about ops cost in infrastructure, but ops cost in debugging consistency errors.