News for hackers. Stuff that matters.
Re:Redis Re-Implemented with SQLite by jitl on Sunday April 14, 2024 @03:01PM (#40033473)
Redis drops data semi randomly when under memory pressure.

If you use Redis for queue tasks (this is popular in Rails and Django/Python web services), that means that during an incident where your queue jobs are getting added faster than they’re removed, you’re going to lose jobs if the incident goes on long enough.

Re:Redis Re-Implemented with SQLite by byroot on Sunday April 14, 2024 @03:08PM (#40033526)
That depends on how the `maxmemory-policy` is configured, and queue systems based on Redis will tell you not to allow eviction. https://github.com/sidekiq/sidekiq/wiki/Using-Redis#memory (it even logs a warnings if it detects your Redis is misconfigured IIRC).
Re:Redis Re-Implemented with SQLite by kiitos on Sunday April 14, 2024 @03:39PM (#40033762)
Well, of course! Redis is not (and has never been) a database, it's a data structure server, at best described as a cache. If jobs are added faster than they're removed, this is straight queueing theory 101 -- ideally you'd reject jobs at add-time, but otherwise you have to drop them.
Re:Redis Re-Implemented with SQLite by gnarbarian on Sunday April 14, 2024 @04:16PM (#40034080)
Right. I think Redis hitting the disk would be a terrible tradeoff compared to making a new backend call. it probably wouldn't save you much time and I imagine it would lead to very strange and unpredictable behavior on the front end or trying to debug latency or data issues downstream
Re:Redis Re-Implemented with SQLite by prisenco on Sunday April 14, 2024 @04:04PM (#40033986)
Since Redis is an in-memory cache, and already doesn't guarantee the data, would it make sense to set PRAGMA SYNCHRONOUS on nalgeon to OFF to boost performance to something closer to standard Redis?