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. petepe+gp[view] [source] 2021-06-12 11:47:20
>>sologo+m1
The requirement for the project was that the deletion should be handled in as fail-safe a manner as possible. Relying on external jobs, cron, other scheduled tasks etc were deemed a risk.

We were already using Redis for other things, it was the logical choice for this scenario.

[go to top]