rethinkdb / rethinkdb

The open-source database for the realtime web.
https://rethinkdb.com
Other
26.74k stars 1.86k forks source link

Allow to join or exit a cluster through DataExplorer/client/api #1473

Closed cxmcc closed 1 year ago

cxmcc commented 11 years ago

We should be able to join/exit a cluster or reconfigure cluster info through the clients, like most databases do.

jdoliner commented 11 years ago

Joining a cluster through the webUI would be kind of cool. I'm going to put this in backlog.

mlucy commented 11 years ago

We've talked before about being able to do all the CLI operations from a client, and I still think it would be a good idea once we get some breathing room.

cxmcc commented 11 years ago

I was just thinking joining a cluster is a one time thing thus probably should not be a parameter in command line. And we should probably be able to change which cluster the instance is a part of without restarting db.

danielmewes commented 9 years ago

We can look into this again after the Raft release. I think it would be neat being able to add servers to a cluster without having to use special command line arguments.

danielmewes commented 9 years ago

Apparently Riak provides such an option. See https://github.com/rethinkdb/rethinkdb/issues/4488#issue-92483810 for a screenshot and description.

andyburke commented 9 years ago

Sad to see there is an existing, really old issue for this. Is dynamically joining a cluster really just not high enough priority to make it in? Is there any way to help bump the priority of this up?

danielmewes commented 9 years ago

@andyburke We're just finishing up the "Raft release" (RethinkDB 2.1), which changes how servers are managed internally. We wanted to wait for this to not duplicate work.

Generally there doesn't seem to be as much demand for this as for some of the other features, since it's already fairly easy to join a cluster through the --join command line / configuration option.

Would you mind specifying your scenario a bit more by the way? You mentioned in the other issue that this would be useful for your Docker deployment. Is there anything in particular that makes it difficult to alter the configuration file?

timmaxw commented 9 years ago

There is a workaround for joining two existing servers together. If you start a third server and instruct it to join both of the existing ones, it will introduce them to each other. You can then shut down the third server since it's no longer needed. If you start the third server in rethinkdb proxy mode, then it won't even create any data files.

AtnNn commented 9 years ago

This seems like a great feature, but it would increase the probability of running into #1905. It might be worth fixing that first.

andyburke commented 9 years ago

@danielmewes The simplest explanation is this line from my docker file:

CMD [ "rethinkdb", "--bind", "all" ]

I don't want to have to add a --join there pointing to some static ip such that a) I have a bootstrapping problem or b) I have to change my dockerfile if (when) my primary db server changes.

Ideally I could spin up a rethinkdb container and then do:

docker exec rethinkdb-container rethinkdb join <ip of master server>
AtnNn commented 9 years ago

As described by @timmaxw above, you could do:

docker exec rethinkdb-container rethinkdb proxy --join localhost --join <ip of master server>

Unfortunately you also need to then kill the proxy with ^C, or if you are scripting the process, add something like & sleep 10; kill $!

I agree it would be nice to have a more straightforward and less error-prone way of doing this.

mglukhovsky commented 9 years ago

Another potential solution for @andyburke's use case: better integration with node discovery tools (which we've discussed in #3217), e.g. you could point to etcd to find the cluster.

andyburke commented 1 year ago

was this ... actually completed?

srh commented 1 year ago

No, I presume it was because OP was clearing out 9 year old issues. I'll change the closing reason.

andyburke commented 1 year ago

I'm sad. I had a little glimmer of hope. 🤣