logoalt Hacker News

antirezyesterday at 10:01 PM5 repliesview on HN

The point of Redis is data structures and algorithmic complexity of operations. If you use Redis well, you can't replace it with PostgreSQL. But I bet you can't replace memcached either for serious use cases.


Replies

hmcfletchyesterday at 10:54 PM

As someone who is a huge fan of both Redis and Postgres, I whole heartedly agree with the "if you are using Redis well, you can't replace it with PostgreSQL" statement.

What I like about the "just use PostgreSQL" idea is that, unfortunately, most people don't use Redis well. They are just using it as a cache, which IMHO, isn't even equivalent to scratching the surface of all the amazing things Redis can do.

As we all know, it's all about tradeoffs. If you are only using Redis as a cache, then does the performance improvement you get by using it out weight the complexity of another system dependency? Maybe? Depends...

Side note: If you are using Redis for caching and queue management, those are two separate considerations. Your cache and queues should never live on the same Redis instance because the should have different max-memory policies! </Side note>

The newest versions of Rails have really got me thinking about the simplicity of a PostgreSQL only deployment, then migrating to other data stores as needed down the line. I'd put the need to migrate squarely into the "good problems" to have because it indicates that your service is growing and expanding past the first few stages of growth.

All that being said, man I think Redis is sooooo cool. It's the hammer I am always for a nail to use on.

abtinfyesterday at 10:36 PM

“well” is doing a lot of heavy lifting in your comment. Across a number of companies using Redis, I’ve never seen it used correctly. Adding it to the tech stack is always justified with hand waving about scalability.

PunchyHamsteryesterday at 11:12 PM

well, redis is a bit of a junk bin of random barely related tools. It's just very likely that any project of non-trivial complexity will need at least some of them and I wouldn't necessarily advocate for trying jerry-rigging most of them in postgresql like the author of article, for example why would anyone want wasting their SQL DB server performance on KV lookups?

lstoddyesterday at 10:09 PM

There are data structures in Redis?

They may be its point, but I frankly didn't see much use in the wild. You might argue that then those systems didn't need Redis in the first place and I'd agree, but then note that that is the point tigerdata makes.

edit: it's not about serious uses, it's about typical uses, which are sad (and same with Kafka, Elastic, etc, etc)

yalldidwhatyesterday at 10:08 PM

Did someone really downvote the creator of Redis?

show 3 replies