by antirez · 6y ago · 0 comments
Of course I disagree with that statement. Many serious Redis use cases at big companies assume Redis is there and will hold your data. What they usually assume is that under certain cases during failovers or other serious failures you many lose some acknowledged writes that were sent immediately before. And this most of the times does not happen too. Note that many high performance applications using SQL DBs with a relaxed fsync configuration will have the same assumption. The suggestion should be more: if Redis for you is just a volatile aid, use a given setup, if it's were you store data, use another setup.
Anyway if you want to see a version of Redis where you can store also bank accounts, transactions or any other of the most critical stuff you can store in a DB make sure to check the news at Redis Conf 2020 (the conf is in streaming and free).
EDIT: But even after that announcement the biggest value for Redis is that it can be fast and provide a "best effort" consistency level that is adequate for a lot of use cases in practice. Many systems were sacrified in the temple of wanting to provide linearizability for all the use cases.
> And this most of the times does not happen too.
This rubs me very very wrong. There is no maybe in data integrity. Redis wasn’t designed to be ACID and shouldn’t be treated as such just because “usually” it doesn’t lose data “under the right circumstances.”
If a sysadmin uses an RDBMS with relaxed fsync, they know what they are getting (and durable writes is not one of them, no usually about it). Same for Redis.
Removing fsync is generally referred to as "running with scissors" mode, although postgres now supports it better with unlogged tables.
I came up with a "mental framework" that allowed me to get beyond these details early when I started architecting systems for companies.
1) Identify what are the possible malfunctions
2) What mechanisms will I use to detect these malfunctions as early as possible
3) Do I have a clear and concise recovery path for said malfunctions.
This frame of thought has taken me far (in terms of being able to accomplish a lot in my career so far) and allowed me to move forward without (a) extensive, time-consuming, research into the specific tools I'm using into the specific situations which may never happen, (b) extensive costs hiring experts in these niche areas.
Sometimes you don't need ACID guarantees, which is part of the reason databases like Redis exist, and is why the compromises you're describing are important. But in this context it sounds like the framework you're describing would lead to rolling your own ACID for Redis instead of just using an ACID database to begin with.
Redis was never designed for strong Synchronous replication of transaction or Strong leader election.
So each time a master crash you have a high chance of some recent acknowledged write being lost.
we live in the age of devOps. there's no such thing as sysadmin, or god forbid, DBAs.
/sarcasm
Favorite datastore to date. The only thing I wish for frequently is native global change-data-capture without doing something manually with streams (I've thought about writing a replication protocol consumer, but the way resync's are handled is a little problematic)
Worker is a DIY stream consumer implementation. The stream -> lambda integration works, but its super limited (and ~300ms slower to get new events on average)
> "Remember redis (in AWS) holds ephemeral data in memory"
(because EC2 machines don't persist their disk data between start/stops and a lot of people don't realize that until it is too late - hey remember that Bitcoin exchange that got bitten by this?)
EBS is now the default when creating an instance, and instance types of newer generations generally don't have instance store at all (except disk optimized instance types, and those with "d" in the name.)
Yes if you do an ordinary OS reboot the disk remains.
Bad idea. Bad tool for the job.
He sort of implies here, not for you, but it might create that impression on others, was clarifying for those.
I understand your defensiveness, but please understand that because of your massive experience with Redis, either you have never lost data with Redis, which means that nobody besides you understands how to run your software in production, or you have lost data with Redis, which means that it's somewhat hypocritical of you to insist that Redis is durable.
Hogwash and there are plenty of examples out there that prove otherwise.
> somewhat hypocritical of you to insist that Redis is durable
If Jepsen has demonstrated anything, it's that no database is as durable as it claims to be.
Redis is an extremely reliable service. I've never "lost" data with Redis.