4 ms·
Process migration (moving instance) is not easy. In the simplest level, you still want to have some kind of naming/binding scheme such that the migration will b
by liuliu 16y ago
Process migration (moving instance) is not easy. In the simplest level, you still want to have some kind of naming/binding scheme such that the migration will be transparent in application layer (well, DNS, maybe). Besides, with your proposal in "Moving Instance", there are still race conditions. For example, when you "slaveof no one"ed on the new instance, which instance (old or new) will handle the incoming request? It seems to me either way, you will end up in an inconsistent state (or handle some request faultily). Well, I need to lookup the underlying mechanism of "slaveof" to be confident about that, but it is worth to point out.
I'd like to be able to use Redis Cluster as soon as it is available, here is my question: how can I help? Recently, I want to start write some script for rehashing, but there are some problems, namely, I cannot just "get/set" everything (e.g., I cannot "get/set" a list with some serialized format). Do you have recommended way of doing that?
- antirez 16y agoHello liuliu, there is no race: when all the clients are pointed to write in the new instance, that is a slave, but as all Redis slaves can accept writes, you are already ok. Then you elect the instance as master just to disconnect the real master without issues. Redis Cluster is something where we (Redis core team, that is, I and Pieter) can't get help for now, but will need help soon with testing.
- moe 16y agoCount me in, I'm also eagerly waiting for the cluster feature. Have you considered relying on Zookeeper for the gossip heavy-lifting? Yes it's java (ugh) and would add an external dependency (ugh), but it's battle-tested and could perhaps save you from re-inventing such a complex wheel?
- jrockway 16y agoConsidering they won't use a library for the networking, I doubt they are going to add a Java dependency for config management.
- moe 16y agoIt would not be a java dependency but rather a component dependency (you talk to zookeeper over the network). Zookeeper is also not just config management, it's state management. It helps to solve some of the really nasty problems of distributed state, e.g. achieving quorum and dealing with split brain situations. However, it's been a while since I read up on the planned redis-cluster design, so I'm not sure how they are tackling these issues.
- soamv 16y agoSome client A might write to the master, another client B might write to the slave, and other clients will see these updates in a different order depending on which instance they are connected to. Can that happen?
- dlsspy 16y agoWe expand and shrink clusters in membase under heavy load with no issues. The worst thing that happens is that it takes longer some times. There is no inconsistency. It doesn't look like redis is doing exactly what we're doing, but since it's been doing it well for a long time now with plenty of documentation, I'm hoping the knowledge we've shared about it can help others learn how to do similar things.
- antirez 16y agoTo be honest when I saw the membase design what I thought was: hey, this is from the redis cluster design (that predates membase announcement a lot). But then I realized that it's pretty common to invent the same things. You should try doing the same, especially since the idea was made public by Redis before. Check yourself in the git history.
- dlsspy 16y agoThe blog post is from June, but the code I'm talking about predates redis by about three years.
- antirez 16y ago"But then I realized that it's pretty common to invent the same things. You should try doing the same". That said, I really don't care at all. I want to build stuff that work, I want to have fun, understand new things. This is why I build Redis.
- mythz 16y ago"I'm hoping the knowledge we've shared about it can help others learn how to do similar things." "The blog post is from June, but the code I'm talking about predates redis by about three years." @dippsy what exactly are you insinuating here? It sounds like your suggesting #Redis somehow has borrowed/learned from concepts in your unreleased code?? It's actually quite rude.
- 16y ago