zlacker

[return to "Do you really need Redis? How to get away with just PostgreSQL"]
1. petepe+V[view] [source] 2021-06-12 07:08:51
>>hyzyla+(OP)
I've used PostgreSQL in the first two scenarios and would love an opportunity to in the third. It's worked really well and hasn't caused any problems under decent loads.

The one feature of Redis I'd love to have supported in PostgreSQL is to be able to set a TTL on a record. On a recent project where we could only save personal data for so long, it was a must have feature so we had to use Redis for that purpose instead.

◧◩
2. sologo+m1[view] [source] 2021-06-12 07:13:40
>>petepe+V
Wouldn’t a simple scheduled batch job be enough to go through periodically and drop records older than N days?

This would also give you audit logs, etc. As well as flexibility to adjust business logic without updating the TTL on all records.

◧◩◪
3. radica+G1[view] [source] 2021-06-12 07:18:09
>>sologo+m1
It would, and you'd also get nice features like proper transactions and referential integrity.

BUT that comes at a cost. Doing that in Redis is just so easy, and the vast majority of the time no-one is going to notice a few concurrency errors, YOLO!

;-)

To be serious: it's a nice tool to have in the box and is amazing for inexperience/start developers because you can do a lot with very little time investment or knowledge.

◧◩◪◨
4. zigzag+77[view] [source] 2021-06-12 08:20:46
>>radica+G1
What's wrong with Redis' transactions?
[go to top]