Repository navigation
Description
(Note: I'll update the description here as the discussion evolves)
Background
It was asked multiple times by activists in the area of inclusiveness for Redis to migrate to a different terminology than master-slave, specifically one that has no reference to slavery. Personally I do not consider the effort worthwhile, but this is my personal opinion. On the other hand different Twitter threads, especially an exchange with DHH, together with many accounts of people starting to suggest to never use Redis again, made me reflecting about a few things. Specifically I think that it could be a problem for engineers just willing to use Redis because they believe is the right too for the job, to apply it in certain workplaces, because the terminology used in Redis may be a problem. I don't want, as a result of my ideas, to create problems to the Redis community.
At the same time once I started to be more open to the possibility of renaming such terms, I started to receive private complains from multiple people that contribute to the project for years, that are annoyed by the fact we'll have to do work that will not change the system in any way, and that will be costly, create compatibility issues.
My idea is to find a middle ground between all those things, because there are multiple issues caused by the change of terminology:
- PRs will no longer apply.
- We have commands such as
INFOandROLEthat reply with protocol containing the slave term. - There are 1500 occurrences inside the source code of the term slave.
- People having private trees and merging things as needed will get a lot of problems.
So this change can potentially create a lot of issues. Moreover many folks on Twitter do not understand the Redis culture of backward compatibility. Redis 5 that is now release candidate is backward compatible with the first stable version of Redis released, to the point it's a drop in replacement. This culture traditionally made sure that upgrade operations are simple, there is no useless work to do in the client side, and so forth. This is something big to consider.
Possible soltuion
Yet I want to give a signal, because in a Twitter pool I started too many people asked for the terminology to be changed. While I handle the Redis community, I do not want to be its king, I need to serve people here. A signal however does not need to create a number of problems across the community, so this is what I propose to do.
Short term changes
To start we do the following:
- Change the documentation to refer to master-replica. If we take master, which should not offend anybody in 2018 (next year we'll see...), at least there are less things to change. Replicas is very used and is also used inside Redis Cluster already.
- Alias SLAVEOF to REPLICAOF. You can still use SLAVEOF but now there is an option.
- Refer to REPLICAOF inside the documentation.
- Change the configuration directive as well from
slaveoftoreplicaof. - Leave all the internals as they are mentioning still slave at source level as a first step. Changing all those things now would be a big issue because we are at release candidate state, and there are too many pending PRs.
- Continue to reply with
slaveto INFO and ROLE, because this is a major breakage, for now.
Long term changes
- At some point in the future, write an alternative to INFO, since anyway INFO is not the future of Redis data gathering... It's too limited, provides too many info at once, clients need to have to parse it. We'll design a new command, and in the new command we'll not refer to slaves, but to replicas.
- When we are going to break a lot of things anyway, like for example with the inclusion of RESPv3, also change the
ROLEcommand to output replica instead of slave. If clients detect it's a RESPv3 server, they now that ROLE will reply differently, that is, instead of "slave" it will reply with "replica". - The first thing that we'll have to replace a lot of things internally, because of some technical reason, so that many PRs will not apply anyway, switch the variable and function names as well. However this is not acceptable to do as a change out of context, because it will cause really a lot of problems. We have to put this inside a much larger change somewhere.
We'll provide no ETA for the second step, and I hope the community will understand our technical issues here. However I hope that people will appreciate that at least somebody is listening here. Certain people demanding this change are vocal and hostile, but I saw a huge amount of people on Twitter just asking peacefully to see some improvement. One thing is for sure: the master-slave terminology is not going to be used in the future, so let's make this change together, and move forward to our actual work, that is, to make Redis better and available.
Please provide your POV if you are among the contributors of Redis
I know this may seem gross, but I would like most comments here to be provided by people that did something in Redis-land in the latest few years. People sending PRs, opening issues, writing a client library, using Redis at scale and provided hints regularly, and so forth, don't just comment if you are a casual Github user jumping here to say "change it!" or "don't change it". This will just create noise. Thanks.
Off topic and offensive comments will be removed
Activity
dvirsky commentedon Sep 7, 2018
Hi Salvatore. Thanks for this post.
This does make sense. One technical note - I'm not sure REPLICATE is a good alternative to SLAVEOF. It implies (at least to me) to mean what the master is doing, not the
slavereplica. May I suggestFOLLOW <master>? it's not a perfect analogy but to me conveys less semantic ambiguity, which REPLICATE certainly does.antirez commentedon Sep 7, 2018
@dvirsky thanks for commenting. Yep I understand it may create issues, could be really cool to have the config directive that is similar to the name we give to replicas.
NickCraver commentedon Sep 7, 2018
I think
REPLICAOFwould to me be an easier migration and feels more right than REPLICATE - totally subjective though and curious what others think.I wonder if "master" should become "primary" for the sake of a clean break on both terms. I think it'd be much easier to explain to someone. For what it's worth, we use master and primary interchangeably when describing our topology all the time.
dvirsky commentedon Sep 7, 2018
In recorded media Master also means the single source of truth, and there is no term for slave, and I doubt anyone has any problem with it. So I think keeping Master should be fine.
dvirsky commentedon Sep 7, 2018
+1 for REPLICAOF
mgravell commentedon Sep 7, 2018
antirez commentedon Sep 7, 2018
Indeed Marc, I think that
ROLEcould just return "master" and "replica" as well, exactly like we'll call them in other parts. However about the word master I want to be sure it is considered an acceptable replacement... If it's ok, I would love to at least take "master", because I find switching from "slave" to "replica" much simpler compared to calling the master something else, because when talking about Redis it was already in use to say replicas sometimes, but masters are always masters in the past documentation, in the way people talk when referring to Redis and so forth.antirez commentedon Sep 7, 2018
I'm updating the proposal with the suggestions so far.
ChrisMcKee commentedon Sep 7, 2018
Seems the best solution for what is mostly an unnecessary situation. Not breaking the entire ecosystem is good and +1 for ReplicaOf.
tongpu commentedon Sep 8, 2018
I'm with @NickCraver regarding replacing "master" with "primary". PostgreSQL has been using the same nomenclature for a long time now.
mythz commentedon Sep 8, 2018
Solid plan, seems the least invasive path forward that mitigates breaking existing clients/systems. You can always do more later so makes sense to start with the least disruptive change to fix the problematic term first.
I'm fine with either "master" or "primary" but RESPv3 only gives you 1 chance at a breaking window so I'm more inclined to change it to "primary" there as well. It's minimal work for clients to handle both when adding support for RESPv3 and it's going to be prohibitively disruptive to change it later. (IMO "master" can be a more cosmetic change i.e. retain references in source but add aliases to "primary" and change defaults later in docs/config after RESPv3 becomes standard).
Over time the master/replica combo is going to sound unfamiliar and unique to Redis as I'm expecting everyone else to move to primary/replica to describe that relationship, so for the sake improved clarity/familiarity for future readers it might make sense that RESPv3 adopts both terms. But if you think the risk of breaking the ecosystem is too great then we should retain it, but whatever terms RESPv3 goes with I think should be retained permanently.
simonw commentedon Sep 8, 2018
Personally I like primary/replica - it's a much more accurate metaphor than master/replica in my opinion. And using the same terminology as PostgreSQL is a big positive.
mgravell commentedon Sep 8, 2018
antirez commentedon Sep 8, 2018
Folks I'm not interested in picking the most appropriate terminology here, but the one that is the minimum delta compared to what we are used, without being offensive to certain groups at the same time. If "master-replica" is not offensive, this is what I think we should use, because "primary" is really very far from historical terminology and to what we use in Redis-land. Master & replicas we already use, so I would stick with them if master is ok.
To clarify, I don't think that the semantical meaning is actually useful. Master-slave is totally bad at describing the two roles, but everybody understand what it is about, because in replication context you give to the words such meaning.
However @mythz has a point IMHO in that we should make totally sure that what we pick will not be sensed as wrong in a few years. But honestly this could happen anyway given the environment that is shaping out there.
CBaquero commentedon Sep 8, 2018
I can't even imagine the amount of implications of the name change so I totally understand the pragmatic approach of keeping master and only renaming the slave. Anyway I went to one textbook I trust (Distributed Systems for System Architects. Authors: Veríssimo, Paulo, Rodrigues, Luís) and that was at hand and reminded myself of the different terminologies.
In replication there is a division between systems following active replication (where several replicas of the same state machine execute the same sequence of actions, often disseminated by atomic multicast) and passive replication (only one replica executes commands and others periodically catch up).
I guess the open source Redis case matches more the passive replication category, so lets look at the terminology there:
The special (elected or pre-configured) replica that executes the commands/actions first is called primary and the other replicas can be called secondary or backup. This leads to the terminology pairs primary/backup or primary/secondary. Now I also realize that this terminology is better that master/slave because both backup and secondary terms convey more the notion that those replicas can in the future replace the role of the primary.
To me the term replica does not equate immediately with something being a secondary to another entity. Also in geo-replicated settings, and others, we can have multiple active replicas and I believe the common term for this is still multi-master. The open source Redis, I believe, will fall in the single-master category.
Given all this, and given that there is a clear advantage in keeping master, maybe master/backup or master/secondary would be interesting options to consider in place of master/replica.
114 remaining items
NeveHanter commentedon Sep 12, 2018
That's funny that 72% of people voting here in the opening message disagree with the change and 53% of the people on Twitter agree, maybe that's problem's with Twitter's pool anonymity or mostly toxic culture, I'm not sure...
But I think people here compared to the people on Twitter want backward compatibility and no terminology confusion more instead of bringing unnecessary name changes which in the end brings only the problems in every integration area starting from source code compatibility, auxiliary scripts and ending on software made to inter-operate with the Redis, i.e. Ansible, python's redis, etc..
I'm not even mentioning confusion it will bring after so many years of using different naming used in nearly every piece of software, master/slave in USB and all the books existing, maybe they will even burn the books just because there's such terminology?
Anyway, it's FOSS, they are all free to fork the source code and make their version without offensive terminology, so don't force yourself and these name changes just because some minority wants it, don't break like people from Django, Drupal, Facebook, Python who make the changes just because couple of some people had their different non-constructive thoughts.
runningdogx commentedon Sep 12, 2018
I find it offensive that Redis has decided to appropriate replicant culture by using the term "replica".
Why is "slave" any more offensive than "master", anyway? The "master" is the source of the problem, right?
This is absurd. SJWs need to grow up, but they can't because their parents, colleges, and even some workplaces now are coddling them. See Jonathan Haidt's new book, for instance. This whole situation is pathetic.
sanicheev commentedon Sep 13, 2018
Do not support decisions/thoughts of stupid people please.
destinywang commentedon Sep 13, 2018
I don't know why, it's just a technical term, we just have to care if it's practical.
franklingu commentedon Sep 13, 2018
The whole idea of relating technical terms to politics or social justice is absurd! If people use that word to insult someone, then you should say that is not allowed; if we did not mean that at all and before some SJWs jump out and say this is wrong nobody actually realizes that, I do not see any reason why anything has to be changed.
I wonder what is the next step then if this got changed as well -- maybe uWSGI needs to stop using emperor in their documentation as well. Those algorithms like Raft or Paxos need to change to be more diplomatic?
DzianisH commentedon Sep 13, 2018
Hi @NeveHanter ,
I'm just curious, how you got this numbers below, can you share it? It's possible to read all comments on GitHub and come up with some number, but i don't think it's possible on Twitter..
(sorry for spam, but this issue isn't technical discussion anymore :) )
muse commentedon Sep 13, 2018
Ah... another solid piece of software succumbs to the SJW pressure, what a shame.
ip1981 commentedon Sep 13, 2018
Redis is not a one hundred dollar bill, not everyone is going to like it.
axvm commentedon Sep 13, 2018
Tip for trolls:
Next level trolling is call to remove 'kill' cmd from anywhere in kernel ans OS because it looks like reference to genocide of humanity
antirez commentedon Sep 13, 2018
I finished the word change, closing this issue. I see that people opposing the change are exactly as extremist as people very vocal about doing the change. Ok, I'm part of the persons that say that this is probably totally useless, create confusion and so forth, and that it is mostly an American issue. However trust me that I received many emails and messages on Twitter even from very valuable members, including ones that wrote non trivial code in the core of Redis, that said "this is a good move", so our sensibility, of people that do not care and believe this is bullshit, is not the only possible sensibility and opinion. And there are at least ,let's say, 10% of people that are not activist and are big Redis users that feel like this is the direction. Given that changing the word in a backward compatible manner creates very little troubles to the other 90%, I feel like in that case, that minority needed to be taken care of. So... that's all, and we can move forward.
antirez commentedon Sep 13, 2018
Another thing that many of you did not understand is that I would never do that change if it was just for the very vocal activists and their aggressiveness. The point is the relatively silent persons that at this point developed such sensibility and are member of our communities. So if you say "Oh that SWJ are ruining the world as they ruined Redis!" this is not history, it is not how things happened this time around.
axvm commentedon Sep 13, 2018
Time to fork redis and revert those commits?
Voting for fork name via react:
👍- slaveredis
👎- masteredis
😄- slaverydb
❤️- bdsmdb
ip1981 commentedon Sep 13, 2018
rediska ;)